Problem
In acid.tex, the Write Skew test defines pair k as:
p1.id = 2*k+1
p2.id = 2*k+2
Therefore the logical pairs are (1,2), (3,4), ..., (19,20).
However, the WS T_R query in Listing fig:ws2 matches every pair of consecutive IDs:
MATCH (p1:Person),
(p2:Person {id: p1.id+1})
WHERE p1.value + p2.value <= 0
This also checks cross-pair neighbors such as (2,3), even though those vertices belong to different logical pairs. Such a pair is not covered by the invariant and can produce a false write-skew violation.
The same query was propagated to several implementations in ldbc/ldbc_acid; see ldbc/ldbc_acid#15.
Suggested fix
Restrict p1 to the first (odd-ID) vertex of each logical pair:
MATCH (p1:Person),
(p2:Person {id: p1.id+1})
WHERE p1.id % 2 = 1
AND p1.value + p2.value <= 0
This makes the anomaly-check query consistent with the pair definition in the preceding test description.
Problem
In
acid.tex, the Write Skew test defines pairkas:p1.id = 2*k+1p2.id = 2*k+2Therefore the logical pairs are
(1,2),(3,4), ...,(19,20).However, the
WS T_Rquery in Listingfig:ws2matches every pair of consecutive IDs:This also checks cross-pair neighbors such as
(2,3), even though those vertices belong to different logical pairs. Such a pair is not covered by the invariant and can produce a false write-skew violation.The same query was propagated to several implementations in
ldbc/ldbc_acid; see ldbc/ldbc_acid#15.Suggested fix
Restrict
p1to the first (odd-ID) vertex of each logical pair:This makes the anomaly-check query consistent with the pair definition in the preceding test description.