gianm commented on a change in pull request #8870: Additional Kinesis
resharding fixes
URL: https://github.com/apache/incubator-druid/pull/8870#discussion_r351922329
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentTransactionalInsertAction.java
##########
@@ -79,21 +81,32 @@ public static SegmentTransactionalInsertAction
appendAction(
@Nullable DataSourceMetadata endMetadata
)
{
- return new SegmentTransactionalInsertAction(null, segments, startMetadata,
endMetadata);
+ return new SegmentTransactionalInsertAction(null, segments, startMetadata,
endMetadata, null);
+ }
+
+ public static SegmentTransactionalInsertAction commitMetadataOnlyAction(
+ String dataSource,
+ DataSourceMetadata startMetadata,
+ DataSourceMetadata endMetadata
+ )
+ {
+ return new SegmentTransactionalInsertAction(null, null, startMetadata,
endMetadata, dataSource);
}
@JsonCreator
private SegmentTransactionalInsertAction(
@JsonProperty("segmentsToBeOverwritten") @Nullable Set<DataSegment>
segmentsToBeOverwritten,
- @JsonProperty("segments") Set<DataSegment> segments,
+ @JsonProperty("segments") @Nullable Set<DataSegment> segments,
@JsonProperty("startMetadata") @Nullable DataSourceMetadata
startMetadata,
- @JsonProperty("endMetadata") @Nullable DataSourceMetadata endMetadata
+ @JsonProperty("endMetadata") @Nullable DataSourceMetadata endMetadata,
+ @JsonProperty("dataSource") @Nullable String dataSource
)
{
this.segmentsToBeOverwritten = segmentsToBeOverwritten;
- this.segments = ImmutableSet.copyOf(segments);
+ this.segments = segments == null ? ImmutableSet.of() :
ImmutableSet.copyOf(segments);
Review comment:
So, we'll need to note that new tasks and old overlords (which is typical
during a rolling update) will potentially break if this case is hit? I guess
that isn't the end of the world, since it would have broken before anyway. But
what should people do about it? Just let it fail repeatedly until the rolling
update is done? Should people shut down supervisors before the update and then
start them afterwards? What are the odds of this case being hit?
(The above should be answered for the release notes)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]