Skip to content
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

Revert "reject publishing actions with a retriable error code if a earlier task is still publishing (#17509) #17812

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ private <R> R performAction(TaskAction<R> taskAction)
return result;
}
catch (Throwable t) {
log.error(t, "Failed to perform action[%s]", taskAction);
throw new RuntimeException(t);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import org.apache.druid.error.InvalidInput;
import org.apache.druid.indexing.common.TaskLockType;
import org.apache.druid.indexing.common.task.NoopTask;
import org.apache.druid.indexing.common.task.Task;
Expand All @@ -31,7 +32,6 @@
import org.apache.druid.indexing.overlord.Segments;
import org.apache.druid.indexing.overlord.TimeChunkLockRequest;
import org.apache.druid.java.util.common.Intervals;
import org.apache.druid.metadata.RetryTransactionException;
import org.apache.druid.timeline.DataSegment;
import org.apache.druid.timeline.partition.LinearShardSpec;
import org.assertj.core.api.Assertions;
Expand Down Expand Up @@ -151,7 +151,7 @@ public void testFailTransactionalUpdateDataSourceMetadata() throws Exception

Assert.assertEquals(
SegmentPublishResult.fail(
new RetryTransactionException(
InvalidInput.exception(
"The new start metadata state[ObjectMetadata{theObject=[1]}] is"
+ " ahead of the last committed end state[null]. Try resetting the supervisor."
).toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2102,9 +2102,7 @@ protected DataStoreMetadataUpdateResult updateDataSourceMetadataWithHandle(

if (startMetadataGreaterThanExisting && !startMetadataMatchesExisting) {
// Offsets stored in startMetadata is greater than the last commited metadata.
// This can happen because the previous task is still publishing its segments and can resolve once
// the previous task finishes publishing.
return DataStoreMetadataUpdateResult.retryableFailure(
return DataStoreMetadataUpdateResult.failure(
"The new start metadata state[%s] is ahead of the last committed"
+ " end state[%s]. Try resetting the supervisor.",
startMetadata, oldCommitMetadataFromDb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -858,15 +858,15 @@ public void testTransactionalAnnounceFailDbNullWantNotNull()
);
Assert.assertEquals(
SegmentPublishResult.fail(
new RetryTransactionException(
InvalidInput.exception(
"The new start metadata state[ObjectMetadata{theObject={foo=bar}}] is ahead of the last committed"
+ " end state[null]. Try resetting the supervisor."
).toString()),
result1
);

// Should be retried.
Assert.assertEquals(2, metadataUpdateCounter.get());
// Should only be tried once.
Assert.assertEquals(1, metadataUpdateCounter.get());
}

@Test
Expand Down
Loading