diff --git a/atlasdb-api/src/main/java/com/palantir/atlasdb/transaction/api/TransactionConflictException.java b/atlasdb-api/src/main/java/com/palantir/atlasdb/transaction/api/TransactionConflictException.java index efbd7820804..9c18bc0d93d 100644 --- a/atlasdb-api/src/main/java/com/palantir/atlasdb/transaction/api/TransactionConflictException.java +++ b/atlasdb-api/src/main/java/com/palantir/atlasdb/transaction/api/TransactionConflictException.java @@ -102,8 +102,8 @@ private TransactionConflictException( @Override public @Safe String getLogMessage() { - return "There was a write-write transaction conflict. This transaction wrote a cell to which a concurrent" - + " transaction wrote a different value."; + return "There was a write-write transaction conflict. This transaction wrote to a cell while another, " + + "concurrent transaction wrote to the same cell."; } @Override diff --git a/atlasdb-cassandra-integration-tests/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/AbstractCassandraKeyValueServiceIntegrationTest.java b/atlasdb-cassandra-integration-tests/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/AbstractCassandraKeyValueServiceIntegrationTest.java index 6407f46d3ce..8801390f3e5 100644 --- a/atlasdb-cassandra-integration-tests/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/AbstractCassandraKeyValueServiceIntegrationTest.java +++ b/atlasdb-cassandra-integration-tests/src/test/java/com/palantir/atlasdb/keyvalue/cassandra/AbstractCassandraKeyValueServiceIntegrationTest.java @@ -231,7 +231,7 @@ public void testCfEqualityChecker() throws TException { .collect(Collectors.toList())); assertThat(ColumnFamilyDefinitions.isMatchingCf( - kvs.getCfForTable(NEVER_SEEN, getMetadata(), FOUR_DAYS_IN_SECONDS), clusterSideCf)) + kvs.getCfForTable(NEVER_SEEN, getMetadata(), FOUR_DAYS_IN_SECONDS), clusterSideCf)) .as("After serialization and deserialization to database, Cf metadata did not match.") .isTrue(); } @@ -256,8 +256,10 @@ private static String getInternalTestTableName() { @SuppressWarnings("CompileTimeConstant") public void shouldNotErrorForTimestampTableWhenCreatingCassandraKvs() { verify(logger, atLeast(0)) - .error(startsWith("Found a table {} that did not have persisted"), - assertArg((Arg arg) -> assertThat(arg.getValue()).doesNotContain("timestamp"))); + .error( + startsWith("Found a table {} that did not have persisted"), + assertArg( + (Arg arg) -> assertThat(arg.getValue()).doesNotContain("timestamp"))); } @Test @@ -492,20 +494,20 @@ public void setOnceTest() { keyValueService.putUnlessExists(userTable, ImmutableMap.of(CELL, sad)); assertThat(keyValueService - .get(userTable, ImmutableMap.of(CELL, Long.MAX_VALUE)) - .get(CELL) - .getContents()) + .get(userTable, ImmutableMap.of(CELL, Long.MAX_VALUE)) + .get(CELL) + .getContents()) .containsExactly(sad); keyValueService.setOnce(userTable, ImmutableMap.of(CELL, happy)); assertThat(keyValueService - .get(userTable, ImmutableMap.of(CELL, Long.MAX_VALUE)) - .get(CELL) - .getContents()) + .get(userTable, ImmutableMap.of(CELL, Long.MAX_VALUE)) + .get(CELL) + .getContents()) .containsExactly(happy); assertThat(keyValueService - .getAllTimestamps(userTable, ImmutableSet.of(CELL), Long.MAX_VALUE) - .size()) + .getAllTimestamps(userTable, ImmutableSet.of(CELL), Long.MAX_VALUE) + .size()) .isEqualTo(1); keyValueService.truncateTable(userTable); } @@ -665,9 +667,9 @@ public void testMultiCheckAndSetCannotUpdateAcrossMultipleRows() { Cell nextTestCell = Cell.create(row(1), column(1)); assertThatThrownBy(() -> keyValueService.multiCheckAndSet(MultiCheckAndSetRequest.newCells( - TEST_TABLE, - firstTestCell.getRowName(), - ImmutableMap.of(firstTestCell, val(0, 0), nextTestCell, val(0, 1))))) + TEST_TABLE, + firstTestCell.getRowName(), + ImmutableMap.of(firstTestCell, val(0, 0), nextTestCell, val(0, 1))))) .isInstanceOf(SafeIllegalStateException.class) .hasMessageContaining("Can only update cells in one row."); } @@ -683,7 +685,7 @@ public void testMultiCheckAndSetIndependentlyFails() { TEST_TABLE, nextTestCell.getRowName(), ImmutableMap.of(nextTestCell, val(0, 1)))); assertThatThrownBy(() -> keyValueService.multiCheckAndSet(MultiCheckAndSetRequest.newCells( - TEST_TABLE, nextTestCell.getRowName(), ImmutableMap.of(nextTestCell, val(0, 2))))) + TEST_TABLE, nextTestCell.getRowName(), ImmutableMap.of(nextTestCell, val(0, 2))))) .isInstanceOf(MultiCheckAndSetException.class); MultiCheckAndSetException ex = catchThrowableOfType( @@ -808,7 +810,7 @@ private CfDef createDefaultCfDef(String namespace, String tableName) { .setComment("") .setColumn_metadata(new ArrayList<>()) .setTriggers(new ArrayList<>()) - .setKey_alias(new byte[]{0x6B, 0x65, 0x79}) + .setKey_alias(new byte[] {0x6B, 0x65, 0x79}) .setComparator_type("org.apache.cassandra.db.marshal.CompositeType" + "(org.apache.cassandra.db.marshal.BytesType,org.apache.cassandra.db.marshal.LongType)") .setCompaction_strategy_options(new HashMap<>())