Skip to content

Commit

Permalink
S3 partitioning fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Singh <ssashish@amazon.com>
  • Loading branch information
ashking94 committed Oct 10, 2023
1 parent 64b5610 commit 7f327b9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.BiConsumer;
Expand Down Expand Up @@ -164,6 +165,7 @@ public class MetadataCreateIndexService {
private final Set<IndexSettingProvider> indexSettingProviders = new HashSet<>();
private final ClusterManagerTaskThrottler.ThrottlingKey createIndexTaskKey;
private AwarenessReplicaBalance awarenessReplicaBalance;
private static final Random random = new Random();

public MetadataCreateIndexService(
final Settings settings,
Expand Down Expand Up @@ -889,7 +891,7 @@ static Settings aggregateIndexSettings(
indexSettingsBuilder.put(SETTING_CREATION_DATE, Instant.now().toEpochMilli());
}
indexSettingsBuilder.put(IndexMetadata.SETTING_INDEX_PROVIDED_NAME, request.getProvidedName());
indexSettingsBuilder.put(SETTING_INDEX_UUID, UUIDs.randomBase64UUID());
indexSettingsBuilder.put(SETTING_INDEX_UUID, Integer.toBinaryString(random.nextInt(256)) + UUIDs.randomBase64UUID());

updateReplicationStrategy(indexSettingsBuilder, request.settings(), settings);
updateRemoteStoreSettings(indexSettingsBuilder, settings);
Expand Down

0 comments on commit 7f327b9

Please sign in to comment.