arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2204.14129cs.DCcs.SE
收藏

MET:模型检验驱动的CRDT设计和实现的探索性测试

MET: Model Checking-Driven Explorative Testing of CRDT Designs and Implementations

Yuqi Zhang, Yu Huang, Hengfeng Wei, Xiaoxing Ma

摘要:

互联网规模的分布式系统通常在多个地理位置复制数据,以提供低延迟和高可用性。无副本的复制数据类型(CRDT)是一个框架,它提供了一种原则性的方法来维护数据副本之间的最终一致性。众所周知,CRDT很难正确设计和实现。微妙的深层错误在于复杂而乏味的处理所有可能的冲突数据更新情况。我们认为,CRDT的设计应该正式指定和模型检查,以发现深层的错误。还需要对执行情况进行系统测试。一方面,测试需要继承模型检验的穷举性,保证测试的覆盖率;另一方面,预期测试将发现设计级验证无法检测到的编码错误。针对上述挑战,本文提出了模型检验驱动的探索性测试框架.在设计层面,MET使用TLA+来指定和模型检查CRDT设计。在实现级别,MET进行模型检验驱动的探索性测试,从这个意义上说,测试用例是自动生成的模型检验痕迹。系统执行被控制为确定性地进行,遵循模型检验跟踪。探索性测试系统地控制和置换所有不确定的消息重新排序。我们在CRDTs的实际开发中应用MET。发现了CRDT设计和实现中的缺陷,对于传统测试技术无法发现的缺陷,MET大大降低了修复缺陷的成本。此外,MET可以以合理的成本发现现有技术无法发现的细微的深层错误。我们进一步讨论MET如何为我们提供足够的信心,我们的CRDT设计和实现的正确性。

英文摘要:

Internet-scale distributed systems often replicate data at multiple geographic locations to provide low latency and high availability. The Conflict-free Replicated Data Type (CRDT) is a framework that provides a principled approach to maintaining eventual consistency among data replicas. CRDTs have been notoriously difficult to design and implement correctly. Subtle deep bugs lie in the complex and tedious handling of all possible cases of conflicting data updates. We argue that the CRDT design should be formally specified and model-checked to uncover deep bugs. The implementation further needs to be systematically tested. On the one hand, the testing needs to inherit the exhaustive nature of the model checking and ensures the coverage of testing. On the other hand, the testing is expected to find coding errors which cannot be detected by design level verification. Towards the challenges above, we propose the Model Checking-driven Explorative Testing (MET) framework. At the design level, MET uses TLA+ to specify and model check CRDT designs. At the implementation level, MET conducts model checking-driven explorative testing, in the sense that the test cases are automatically generated from the model checking traces. The system execution is controlled to proceed deterministically, following the model checking trace. The explorative testing systematically controls and permutes all nondeterministic message reorderings. We apply MET in our practical development of CRDTs. The bugs in both designs and implementations of CRDTs are found. As for bugs which can be found by traditional testing techniques, MET greatly reduces the cost of fixing the bugs. Moreover, MET can find subtle deep bugs which cannot be found by existing techniques at a reasonable cost. We further discuss how MET provides us with sufficient confidence in the correctness of our CRDT designs and implementations.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑