Skip to content

Commit

Permalink
Fix dataStreamPreviousMetadata NPE
Browse files Browse the repository at this point in the history
Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>
  • Loading branch information
sandeshkr419 committed Jun 8, 2023
1 parent cc41985 commit 35b1c8a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ public Builder() {
indicesPreviousState = new HashMap<>();
templates = new HashMap<>();
customs = new HashMap<>();
dataStreamPreviousMetadata = null;
dataStreamPreviousMetadata = DataStreamMetadata.builder().build();
allIndices = Strings.EMPTY_ARRAY;
visibleIndices = Strings.EMPTY_ARRAY;
allOpenIndices = Strings.EMPTY_ARRAY;
Expand Down Expand Up @@ -1453,6 +1453,7 @@ public Builder generateClusterUuidIfNeeded() {

public Metadata build() {
TimeValue buildStartTime = TimeValue.timeValueMillis(System.nanoTime());
boolean dataStreamsChanged = dataStreamPreviousMetadata == this.customs.get(DataStreamMetadata.TYPE);
boolean recomputeRequired = indices.equals(indicesPreviousState) == false || dataStreamPreviousMetadata.equals(this.customs.get(DataStreamMetadata.TYPE)) == false;
TimeValue recomputeEndTime = TimeValue.timeValueMillis(System.nanoTime());
logger.info(
Expand Down

0 comments on commit 35b1c8a

Please sign in to comment.