KAFKA-5038: Catch exception#2841
KAFKA-5038: Catch exception#2841enothereska wants to merge 4 commits intoapache:0.10.2from enothereska:KAFKA-5038
Conversation
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Streams tests also pass on branch builder: https://jenkins.confluent.io/job/system-test-kafka-branch-builder-2/256/ |
|
@ijuma can you please merge this? |
| } | ||
| final File lockFile = new File(directoryForTask(taskId), LOCK_FILE_NAME); | ||
| try { | ||
| lockFile = new File(directoryForTask(taskId), LOCK_FILE_NAME); |
There was a problem hiding this comment.
Is it OK that we call directoryForTask with no protection in ProcessorStateManager before we call lock?
this.baseDir = stateDirectory.directoryForTask(taskId);
this.partitionForTopic = new HashMap<>();
for (TopicPartition source : sources) {
this.partitionForTopic.put(source.topic(), source);
}
this.stores = new LinkedHashMap<>();
this.globalStores = new HashMap<>();
this.offsetLimits = new HashMap<>();
this.restoredOffsets = new HashMap<>();
this.isStandby = isStandby;
this.restoreCallbacks = isStandby ? new HashMap<String, StateRestoreCallback>() : null;
this.storeToChangelogTopic = storeToChangelogTopic;
this.logPrefix = String.format("task [%s]", taskId);
if (!stateDirectory.lock(taskId, 5)) {
throw new LockException(String.format("%s Failed to lock the state directory: %s", logPrefix, baseDir.getCanonicalPath()));
}
There was a problem hiding this comment.
Good catch @ijuma . In this case crashing is probably the right thing to do, however I've now caught the exception and propagated further so at least we know why we're crashing.
|
System test passed https://jenkins.confluent.io/job/system-test-kafka-branch-builder-2/257/ |
|
@dguy mind having another look at recent change? Thanks. |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
Author: Eno Thereska <eno.thereska@gmail.com> Reviewers: Damian Guy <damian.guy@gmail.com>, Matthias J. Sax <matthias@confluent.io>, Ismael Juma <ismael@juma.me.uk> Closes #2841 from enothereska/KAFKA-5038
ijuma
left a comment
There was a problem hiding this comment.
LGTM, merged to 0.10.2. Please file another PR for trunk.
No description provided.