diff --git a/src/cas.rs b/src/cas.rs index 3dba57eeb4e6fcb8fac0f8dcfbd1ad32515eea81..62e4c0abdaec0d04c822e3f35b730b0b922ca56e 100644 --- a/src/cas.rs +++ b/src/cas.rs @@ -321,11 +321,8 @@ pub enum Error { }, /// Checking the predicate revealed a collision. - #[error("ConflictFound: comparison failed for index {requested} as it conflicts with {conflict_index}")] - ConflictFound { - requested: RaftIndex, - conflict_index: RaftIndex, - }, + #[error("ConflictFound: found a conflicting entry at index {conflict_index}")] + ConflictFound { conflict_index: RaftIndex }, /// Checking the predicate revealed a collision. #[error("EntryTermMismatch: entry at index {index} has term {actual_term}, request implies term {expected_term}")] @@ -404,7 +401,6 @@ impl Predicate { storage: &Clusterwide, ) -> std::result::Result<(), Error> { let error = || Error::ConflictFound { - requested: self.index, conflict_index: entry_index, }; for range in &self.ranges { diff --git a/test/int/test_cas.py b/test/int/test_cas.py index 5e1198dd0adf5aedde7a52977aef09b35f16515d..0b1cc0445773287a27fdbc5ad0448e6ba6f19f54 100644 --- a/test/int/test_cas.py +++ b/test/int/test_cas.py @@ -129,8 +129,7 @@ def test_cas_predicate(instance: Instance): assert e5.value.args == ( "ER_PROC_C", "compare-and-swap: ConflictFound: " - + f"comparison failed for index {read_index} " - + f"as it conflicts with {read_index+1}", + + f"found a conflicting entry at index {read_index+1}", ) # Stale index, yet successful insert of another key @@ -195,7 +194,6 @@ def test_cas_lua_api(cluster: Cluster): ) assert e5.value.args == ( "compare-and-swap: ConflictFound: " - + f"comparison failed for index {read_index} " - + f"as it conflicts with {read_index+1}", + + f"found a conflicting entry at index {read_index+1}", ) pass