-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't use UUID in worker storage. #3360
Conversation
If possible, use hostname for workerName
…rkers, to handle NonPersistentStorage case for non-unique storage names
|
||
Wait.builder() | ||
.stepTime(Duration.ofMillis(5)) | ||
.total(Duration.ofSeconds(10)) | ||
.build() | ||
.until(()->getShardNode(context) != null); | ||
|
||
.until(() -> getShardNode(context) != null); | ||
|
||
ShardNodeInformation node = getShardNode(context); | ||
|
||
if(node == null) { | ||
throw new IllegalStateException("Could not find the slave "+context.getRemoteAddress()+" to register worker "+info.getId()); | ||
throw new IllegalStateException("Could not find the shard %s to register worker %s".formatted(context.getRemoteAddress(), info.getId())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouh wie hat das vorher nur funktioniert?
int entityBucketSize, | ||
ObjectMapper persistenceMapper, | ||
ObjectMapper communicationMapper, int secondaryIdSubPlanLimit) { | ||
public static Worker newWorker(@NonNull Dataset dataset, @NonNull ThreadPoolDefinition queryThreadPoolDefinition, @NonNull ExecutorService jobsExecutorService, @NonNull StoreFactory config, @NonNull String directory, @NonNull Validator validator, boolean failOnError, int entityBucketSize, ObjectMapper persistenceMapper, ObjectMapper communicationMapper, int secondaryIdSubPlanLimit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gerne wieder zu einer Liste machen
//The UUID suffix is necessary for shards running on the same hostname. | ||
return InetAddress.getLocalHost().getHostName() + "#" + uuid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
War die Directory anstatt der UUID nicht ausreichend, die sollte doch den Shard Namen inne haben und somit pro dataset eindeutig sein
dataset2Worker.put(worker.getStorage().getDataset().getId(), worker); | ||
final DatasetId datasetId = worker.getStorage().getDataset().getId(); | ||
if (workers.put(datasetId, worker) != null) { | ||
log.warn("Already have a worker for dataset {}: {}", datasetId, worker); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Illegalstate? Oder informieren, dass die referenz überschireben wurde
If possible, use hostname for workerName