From fffeddf3eb0bbbf8fc0ad21aa86a853d3c335aaf Mon Sep 17 00:00:00 2001 From: Patrick Koenig Date: Mon, 30 Sep 2024 06:14:15 -0400 Subject: [PATCH] Improve index conflict handler validation (#7296) --- .../java/com/palantir/atlasdb/table/description/Schema.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/atlasdb-client/src/main/java/com/palantir/atlasdb/table/description/Schema.java b/atlasdb-client/src/main/java/com/palantir/atlasdb/table/description/Schema.java index 697caafc727..67b21e76796 100644 --- a/atlasdb-client/src/main/java/com/palantir/atlasdb/table/description/Schema.java +++ b/atlasdb-client/src/main/java/com/palantir/atlasdb/table/description/Schema.java @@ -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"); } } }