Google Cloud Datastore 中是否可能出现写偏移异常?
Are write-skew anomalies are possible in Google Cloud Datastore?
基于什么 doc says about transaction isolation in Google Cloud Datastore, write-skew anomalies (ssi-vldb12.pdf#2.1.1) 必须是可能的。我说的对吗?
Cloud Datastore 强制执行可序列化隔离 [1]. Which means each transaction executed serially, without overlapping in time [2],[3]。
根据维基百科文章,Snapshot isolation:
In a write skew anomaly, two transactions (T1 and T2) concurrently
read an overlapping data set (e.g. values V1 and V2), concurrently
make disjoint updates (e.g. T1 updates V1, T2 updates V2), and finally
concurrently commit, neither having seen the update performed by the
other. Were the system serializable, such an anomaly would be
impossible, as either T1 or T2 would have to occur "first", and be
visible to the other. In contrast, snapshot isolation permits write
skew anomalies.
正如 Ivan Prisyazhnyy (OP) 指出的那样,数据存储 [1] 是可序列化的 在事务内部 但 在事务外部 它是已提交读, 仅防止脏读,无写偏移异常。
这里有一些它如何工作的例子[2]。
我编写了一些测试来演示数据存储事务隔离中的写偏斜和读偏斜异常 (sitano/datastore-writeskew)。这些测试未能证明预期的行为。数据存储区事务管理器检测冲突的读取和写入并中止(重新启动)至少在代表性情况下可能导致这些异常的事务。
基于什么 doc says about transaction isolation in Google Cloud Datastore, write-skew anomalies (ssi-vldb12.pdf#2.1.1) 必须是可能的。我说的对吗?
Cloud Datastore 强制执行可序列化隔离 [1]. Which means each transaction executed serially, without overlapping in time [2],[3]。
根据维基百科文章,Snapshot isolation:
In a write skew anomaly, two transactions (T1 and T2) concurrently read an overlapping data set (e.g. values V1 and V2), concurrently make disjoint updates (e.g. T1 updates V1, T2 updates V2), and finally concurrently commit, neither having seen the update performed by the other. Were the system serializable, such an anomaly would be impossible, as either T1 or T2 would have to occur "first", and be visible to the other. In contrast, snapshot isolation permits write skew anomalies.
正如 Ivan Prisyazhnyy (OP) 指出的那样,数据存储 [1] 是可序列化的 在事务内部 但 在事务外部 它是已提交读, 仅防止脏读,无写偏移异常。
这里有一些它如何工作的例子[2]。
我编写了一些测试来演示数据存储事务隔离中的写偏斜和读偏斜异常 (sitano/datastore-writeskew)。这些测试未能证明预期的行为。数据存储区事务管理器检测冲突的读取和写入并中止(重新启动)至少在代表性情况下可能导致这些异常的事务。