当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
MonkeyDB: Effectively Testing Correctness against Weak Isolation Levels
arXiv - CS - Programming Languages Pub Date : 2021-03-04 , DOI: arxiv-2103.02830
Ranadeep Biswas, Diptanshu Kakwani, Jyothi Vedurada, Constantin Enea, Akash Lal

Modern applications, such as social networking systems and e-commerce platforms are centered around using large-scale storage systems for storing and retrieving data. In the presence of concurrent accesses, these storage systems trade off isolation for performance. The weaker the isolation level, the more behaviors a storage system is allowed to exhibit and it is up to the developer to ensure that their application can tolerate those behaviors. However, these weak behaviors only occur rarely in practice, that too outside the control of the application, making it difficult for developers to test the robustness of their code against weak isolation levels. This paper presents MonkeyDB, a mock storage system for testing storage-backed applications. MonkeyDB supports a Key-Value interface as well as SQL queries under multiple isolation levels. It uses a logical specification of the isolation level to compute, on a read operation, the set of all possible return values. MonkeyDB then returns a value randomly from this set. We show that MonkeyDB provides good coverage of weak behaviors, which is complete in the limit. We test a variety of applications for assertions that fail only under weak isolation. MonkeyDB is able to break each of those assertions in a small number of attempts.

中文翻译:

MonkeyDB:针对弱隔离级别有效测试正确性

诸如社交网络系统和电子商务平台之类的现代应用程序集中于使用大规模存储系统来存储和检索数据。在存在并发访问的情况下,这些存储系统会权衡隔离性以提高性能。隔离级别越弱,存储系统就可以表现出更多的行为,并且由开发人员来确保他们的应用程序可以容忍这些行为。但是,这些弱行为实际上很少在实践中发生,太在应用程序的控制范围之外,这使得开发人员很难针对弱隔离级别测试其代码的健壮性。本文介绍了MonkeyDB,这是一个用于测试存储支持的应用程序的模拟存储系统。MonkeyDB支持键值接口以及多个隔离级别下的SQL查询。它使用隔离级别的逻辑规范在读取操作中计算所有可能的返回值的集合。然后,MonkeyDB从该集合中随机返回一个值。我们证明了MonkeyDB可以很好地覆盖弱行为,这在极限范围内是完整的。我们测试各种应用程序的断言仅在弱隔离下失败。MonkeyDB可以通过少量尝试来破坏这些断言中的每一个。
更新日期:2021-03-05
down
wechat
bug