Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Improve index conflict handler validation (#7296)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoenig10 authored Sep 30, 2024
1 parent 75fc7f9 commit fffeddf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ public void validate() {
"In index, a component derived from column must reference an existing column");
}

if (indexMetadata.getIndexType().equals(IndexType.CELL_REFERENCING)) {
if (!indexMetadata.getIndexType().equals(IndexType.ADDITIVE)) {
com.palantir.logsafe.Preconditions.checkArgument(
ConflictHandler.RETRY_ON_WRITE_WRITE.equals(tableMetadata.getConflictHandler()),
"Nonadditive indexes require write-write conflicts on their tables");
tableMetadata.getConflictHandler().checkWriteWriteConflicts(),
"Nonadditive indexes must check write-write conflicts");
}
}
}
Expand Down

0 comments on commit fffeddf

Please sign in to comment.