Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ fn engine_serializes_concurrent_record_observation_with_typed_error_on_refusal()
Err(CgError::Engine(message))
if message.contains("transaction control is not allowed from another thread")
|| message.contains("trigger callback is active")
) || matches!(
// Both commits can reach the same pending invalidation key; the loser is
// refused as that key's unique violation, a typed refusal like the others.
result,
Err(CgError::UniqueViolation {
entity: "invalidation",
id: None,
})
)
})
.count();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,13 @@ fn concurrent_record_observation_two_root_serializes_with_typed_error_on_refusal
"unexpected committed invalidation count: {}",
result.invalidations.len()
),
// The losing writer is refused either as a conflict or, when both commits reach the
// same pending invalidation key, as that key's unique violation; both are typed.
Err(CgError::Engine(_)) => {}
Err(CgError::UniqueViolation {
entity: "invalidation",
id: None,
}) => {}
Err(other) => panic!("unexpected error: {other:?}"),
}
}
Expand Down
Loading