Skip to content

Commit

Permalink
Add Queue Size in Configuration (#18672)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohityadav766 authored Nov 18, 2024
1 parent 6f1df37 commit 66c253e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,19 @@ public Integer reIndex(
boolean recreateIndexes,
@Option(
names = {"--producer-threads"},
defaultValue = "10",
defaultValue = "5",
description = "Number of threads to use for processing.")
int producerThreads,
@Option(
names = {"--consumer-threads"},
defaultValue = "10",
defaultValue = "5",
description = "Number of threads to use for processing.")
int consumerThreads,
@Option(
names = {"--queue-size"},
defaultValue = "300",
description = "Queue Size to use internally for reindexing.")
int queueSize,
@Option(
names = {"--back-off"},
defaultValue = "1000",
Expand All @@ -309,10 +314,17 @@ public Integer reIndex(
int retries) {
try {
LOG.info(
"Running Reindexing with Batch Size: {}, Payload Size: {}, Recreate-Index: {}",
"Running Reindexing with Batch Size: {}, Payload Size: {}, Recreate-Index: {}, Producer threads: {}, Consumer threads: {}, Queue Size: {}, Back-off: {}, Max Back-off: {}, Max Requests: {}, Retries: {}",
batchSize,
payloadSize,
recreateIndexes);
recreateIndexes,
producerThreads,
consumerThreads,
queueSize,
backOff,
maxBackOff,
maxRequests,
retries);
parseConfig();
CollectionRegistry.initialize();
ApplicationHandler.initialize(config);
Expand All @@ -327,6 +339,7 @@ public Integer reIndex(
recreateIndexes,
producerThreads,
consumerThreads,
queueSize,
backOff,
maxBackOff,
maxRequests,
Expand All @@ -344,6 +357,7 @@ private int executeSearchReindexApp(
boolean recreateIndexes,
int producerThreads,
int consumerThreads,
int queueSize,
int backOff,
int maxBackOff,
int maxRequests,
Expand All @@ -363,6 +377,7 @@ private int executeSearchReindexApp(
.withRecreateIndex(recreateIndexes)
.withProducerThreads(producerThreads)
.withConsumerThreads(consumerThreads)
.withQueueSize(queueSize)
.withInitialBackoff(backOff)
.withMaxBackoff(maxBackOff)
.withMaxConcurrentRequests(maxRequests)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
},
"queueSize": {
"title": "Queue Size to use.",
"description": "Queue Size to user internally for reindexing.",
"description": "Queue Size to use internally for reindexing.",
"type": "integer",
"default": 100
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"queueSize": {
"title": "Queue Size to use.",
"description": "Queue Size to user internally for reindexing.",
"description": "Queue Size to use internally for reindexing.",
"type": "integer",
"default": 100
},
Expand Down

0 comments on commit 66c253e

Please sign in to comment.