-
Notifications
You must be signed in to change notification settings - Fork 0
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
S192 : seq num fix #35
Conversation
@@ -85,7 +89,7 @@ private static RetryerBuilder baseRetryerBuilder() { | |||
.retryIfExceptionOfType(ApiProxyException.class) | |||
// don't think this is thrown by new datastore lib | |||
// thrown by us if the task state is from the past | |||
.retryIfExceptionOfType(ConcurrentModificationException.class) | |||
.retryIfExceptionOfType(IllegalStateException.class) |
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.
changed this, bc I think it more accurate reflects what the situation is.
I don't think it's getting concurrently modified; I think the task is executing before txn is committed OR before txn outcome can be seen
tx.commit(); | ||
scheduleWorkerTask(settings, taskState, null); |
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.
this should help too; don't enqueue task until AFTER we've successfully committed.
We do have a risk that if enqueuing task fails, shard will just stall out, right? Nothing to recover it and ensure it eventually gets executed.
@@ -183,21 +187,23 @@ private void scheduleControllerTask(ShardedJobRunId jobId, IncrementalTaskId tas | |||
.param(TASK_ID_PARAM, taskId.toString()); | |||
taskOptions.header("Host", settings.getTaskQueueTarget()); | |||
|
|||
taskOptions.etaMillis(System.currentTimeMillis() + CONTROLLER_TASK_DELAY); |
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.
added some delay here, bc again we're inside a txn, but enqueuing in the middle of it rather than at the end.
Fixes
Change implications