Giter Site home page Giter Site logo

3ts's Introduction

Introduction

Tencent Transaction Processing Testbed System (3TS) that is jointly developed by Tencent's TDSQL team and the Key Laboratory of Data Engineering and Knowledge Engineering of the Ministry of Education of Renmin University of China. The system aims to design and construct a unified framework for transaction processing (including distributed transactions). It enables users to quickly build new concurrency control approaches via the access interface provided by the framework. Based on an comprehensive experiment study over the benchmarks, and the applications abstracted, users can select an optimal concurrency control approach. At present, 3TS has been integrated 13 mainstream concurrency control approaches, and provides common benchmarks such as TPC-C,PPS and YCSB. 3TS further provides a consistency level test benchmark, to address the issue of system selection difficulty caused by the blowout development of distributed database systems, and provides consistency level discrimination and performance test comparison.

If you want to better understand the aims of our project, please view 3TS opensource announcement.

Features

  1. Support three ways to generate histories: Traversing Generating, Randomly Generating, Generating From the Text File.
  2. Built-in multiple algorithms, including Serializable Algorithm, Conflict Serializable Algorithm, SSI, BOCC, FOCC, etc.
  3. Support evaluating algorithm cost from the execution time and rollback rate two perspectives.

Dependence

3TS-Coo

A consistency verification system. Please check out the newest update on branch 'coo-consistency-check'.

We update our result on report webpage.

3TS-DA

A static random history generator. Please check out the newest update on branch 'dev'.

  • a compilter supporting C++17 or upper versions (recommend g++8)
  • libconfig 1.7.2
  • gflags 2.1.1
  • gtest 1.6.0

Deneva

A performance verification system. A consistency verification system. Please check out the newest update on branch 'dev'.

  • protobuf 3.9.1
  • curl 7.29.0
  • nanomsg 5.1.0

Usage

  • Run make.sh to compile the code. The 3TS binary will be generated if compiling successfully.
  • Run cp config/config.cfg.template config.cfg to copy the configuration file.
  • Run vi config.cfg to modify the configuration file to determine the behavior of the testbed.
  • Run ./3TS --conf_path=config.cfg to execute test. The test result file will be generated when test is over.

Principle

3TS framework can be divided into four parts:

  • Runner: To determine the behavior of the testbed. The testbed now supports two runners. Please specify the runner behind the Target configuration item, e.g. Target = ["FilterRun"].

    • FilterRun: To output the detection result from each algorithms with each history and the result can be filtered.
    • BenchmarkRun: To test performance by outputting the time cost of each algorithm detecting anomalies from the same number of histories in different transaction numbers and variable item numbers.
  • Generator: To generate histories.

  • Algorithm: To detect anomalies in each history generated by Generator. The testbed supports following algorithms:

    • Serializable Algorithm (Judge whether the history is serializable or not based on the definition of serializable. But the standard to check the consistency between the execution results of concurrent history and serialized history and the read strategy of each transaction are different.):
      • The Serializable Algorithms based on standard that every correspond transactions' read set and every correspond variable items' final version are all same in the four read strategies.
        • "SerializableAlgorithm_ALL_SAME_RU" // uncommitted read strategy
        • "SerializableAlgorithm_ALL_SAME_RC" // committed read strategy (read the latest committed version by which naturally avoid the unserializable cases caused by dirty read anomaly)
        • "SerializableAlgorithm_ALL_SAME_RR" // repeatable read strategy (read the previous version when second reading the same variable item in the same transaction by which naturally avoid the unserializable cases caused by non-repeatable read anomaly)
        • "SerializableAlgorithm_ALL_SAME_SI" // snapshot read strategy (naturally avoid the unserializable cases caused by phantom anomaly)
      • The Serializable Algorithms based on standard that the every committed correspond transactions' read set and every correspond variable items' final version are all same in the four read strategies.
        • "SerializableAlgorithm_COMMIT_SAME_RU" // uncommitted read strategy
        • "SerializableAlgorithm_COMMIT_SAME_RC" // committed read strategy
        • "SerializableAlgorithm_COMMIT_SAME_RR" // repeatable read strategy
        • "SerializableAlgorithm_COMMIT_SAME_SI" // snapshot read strategy
      • The Serializable Algorithms based on standard that only the every correspond variable items' final version are same in the four read strategies.
        • "SerializableAlgorithm_FINAL_SAME_RU" // uncommitted read strategy
        • "SerializableAlgorithm_FINAL_SAME_RC" // committed read strategy
        • "SerializableAlgorithm_FINAL_SAME_RR" // repeatable read strategy
        • "SerializableAlgorithm_FINAL_SAME_SI" // snapshot read strategy
    • Conflict Serializable Algorithm:"ConflictSerializableAlgorithm"
    • Dynamic Line Intersect (Identify Anomaly): "DLI_IDENTIFY"
    • Serializable Snapshot Isolation:"SSI"
    • Write-Snapshot Isolation:"WSI"
    • Backward Optimistic Concurrency Control:"BOCC"
    • Forward Optimistic Concurrency Control:"FOCC"
  • Outputter: To statistics the results and output to the specific file.

For explanations to other configuration items, please view the comments in configuration file.

License

GPLv3 @ Tencent

3ts's People

Contributors

axingguchen avatar fishheader avatar lhxdb avatar rtsien avatar slontia avatar yqekzb123 avatar zhanhaozhao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

3ts's Issues

文档建设和优化:动态测试

类型:代码阅读与文档撰写

阅读目录(3TS/src/​dbtest/​src)下的case_cntl_v2.cc、sqltest_v2.cc、sql_cntl_v2.cc三个文件中的代码,理解3TS-COO的动态测试是如何执行整个测试工作、如何与目标数据库连接并执行操作以及如何分析测试结果,形成完整的代码文档提交pr并合入仓库。

希望得到

  1. 三个文件的概述,包括代码功能、整体结构、与其他文件的关系和在项目中的作用。
  2. 每个文件的具体内容,包括声明和定义的对象、函数等。
  3. 对比静态测试,解释动态测试的不同之处,
  4. 其他你认为重要的内容。

开发方式:将coo-consistency-check代码clone到本地,阅读并调试,形成代码文档并提交到3TS/src/​dbtest/​src/doc

本issue为2024犀牛鸟开源人才培养活动专属issue,仅供在校大学生参与领取
【认领issue】在研学基地"issue营地"对应issue行的M~R列抢滩报名,即视为认领成功
【完成issue】已认领issue的同学,请同步在本issue评论区回复“已成功领取本issue”; 如7天内无提交任何进展包括不限于comment \ commit \ Pull Request,则将视为同学主动放弃issue,组委会将释放issue给下一位等候者。

功能添加:参数发现和提取

类型:功能添加-参数发现和提取

添加参数:3TS-COO现在主要监控事务的执行结果,缺少其他参数的监控。我们希望参与者通过理解框架,自行提出还有什么重要参数可以被提取并监控,添加相关代码,并阐述该参数的意义。

希望得到:对于框架还有什么重要参数的阐述,和提取该参数的功能。

开发方式:fork分支coo-consistency-check代码到自己的仓库,clone后添加时间间隔参数的提取。

本issue为2024犀牛鸟开源人才培养活动专属issue,仅供在校大学生参与领取
【认领issue】在研学基地"issue营地"对应issue行的M~R列抢滩报名,即视为认领成功
【完成issue】已认领issue的同学,请同步在本issue评论区回复“已成功领取本issue”; 如7天内无提交任何进展包括不限于comment \ commit \ Pull Request,则将视为同学主动放弃issue,组委会将释放issue给下一位等候者。

功能添加:隔离级别相关的异常检测

类型:功能添加-隔离级别相关的异常检测

隔离级别是dbms为了平衡隔离性和事务的并发效率而制定的SQL标准。主流DBMS的隔离级别,由低到高包括读未提交,读已提交,可重复读和可串行执行。低的隔离级别,不同事务会互相干扰,而高的隔离级别,每个事务都近似于单独在执行,没有其他事务并发执行。现在3TS-coo的测试样例动态生成(位于3TS/src/​dbtest/​src/mda_generate.py)对于所有隔离级别都生成一样的测试样例。然而同样的测试样例,在不同的隔离级别下,可能结果不同。例如在可重复读隔离级别下的异常测试样例,在读已提交隔离级别下可能是正常行为(为了保证事务的并发效率,该隔离级别允许出现这种“异常”)。

对于不同隔离级别,判断测试样例是否异常的标准也会有所不同。例如,假设某个测试样例在读可提交和可重复读隔离级别下,都出现了幻读现象,则该测试样例在读可提交隔离级别下不应该被检测为异常,但在可重复读隔离级别下应被认为是异常。

现在,3TSCOO检测的是当前测试样例的结果,是否违反了一致性(例如,两个事务A和B并发执行的结果,是否等于先执行A再执行B或先执行B再执行A)。我们希望能够对不同隔离级别,提出不同的检验方法,能够检测出违反隔离级别定义的异常,而非仅仅是违背了事务的一致性。

希望得到:针对不同隔离级别,验证是否异常的新功能。

开发方式:fork分支coo-consistency-check代码到自己的仓库,clone后在新分支上进行开发,然后提交pr合入仓库。相关代码位于(3TS/src/​dbtest/​src/mda_detect.py)

本issue为2024犀牛鸟开源人才培养活动专属issue,仅供在校大学生参与领取
【认领issue】在研学基地"issue营地"对应issue行的M~R列抢滩报名,即视为认领成功
【完成issue】已认领issue的同学,请同步在本issue评论区回复“已成功领取本issue”; 如7天内无提交任何进展包括不限于comment \ commit \ Pull Request,则将视为同学主动放弃issue,组委会将释放issue给下一位等候者。

文档建设和优化:动态测试的样例生成和异常检测

类型:代码阅读与文档撰写

阅读目录(3TS/src/​dbtest/​src)下的mda_detect.py、mda_generate.py和random_do_list.py三个文件中的代码,理解动态测试的样例生成和异常检测,形成完整的代码文档提交pr并合入仓库。

希望得到

  1. 三个文件的概述,包括代码功能、整体结构、与其他文件的关系和在项目中的作用。
  2. 每个文件的具体内容,包括声明和定义的对象、函数等。
  3. 其他你认为重要的内容。

开发方式:将coo-consistency-check代码clone到本地,阅读并调试,形成代码文档并提交到3TS/src/​dbtest/​src/doc

本issue为2024犀牛鸟开源人才培养活动专属issue,仅供在校大学生参与领取
【认领issue】在研学基地"issue营地"对应issue行的M~R列抢滩报名,即视为认领成功
【完成issue】已认领issue的同学,请同步在本issue评论区回复“已成功领取本issue”; 如7天内无提交任何进展包括不限于comment \ commit \ Pull Request,则将视为同学主动放弃issue,组委会将释放issue给下一位等候者。

功能添加:隔离级别相关的测试样例生成

类型:功能添加-隔离级别相关的测试样例生成

隔离级别是dbms为了平衡隔离性和事务的并发效率而制定的SQL标准。主流DBMS的隔离级别,由低到高包括读未提交,读已提交,可重复读和可串行执行。低的隔离级别,不同事务会互相干扰,而高的隔离级别,每个事务都近似于单独在执行,没有其他事务并发执行。现在3TS-coo的测试样例动态生成(位于3TS/src/​dbtest/​src/mda_generate.py)对于所有隔离级别都生成一样的测试样例。然而同样的测试样例,在不同的隔离级别下,可能结果不同。例如在可重复读隔离级别下的异常测试样例,在读已提交隔离级别下可能是正常行为(为了保证事务的并发效率,该隔离级别允许出现这种“异常”)。

换句话说,有些测试样例,只适用于某个隔离级别,而在测试更高级的隔离级别时是无意义的。例如测试读可提交隔离级别是否有幻读现象是无意义的,因为幻读现象是该隔离级别“允许”出现的(符合隔离级别定义),不算是异常。

现在,我们希望能够对不同隔离级别,生成不同的测试样例,这种测试样例如果出现异常,则代表违背了该隔离级别的定义。 本issue不需要验证测试样例是否异常,只需要针对隔离级别的定义,生成对该隔离级别有意义的测试样例即可。

开发方式:fork分支coo-consistency-check代码到自己的仓库,clone后添加相应功能并验证再提PR合并。

本issue为2024犀牛鸟开源人才培养活动专属issue,仅供在校大学生参与领取
【认领issue】在研学基地"issue营地"对应issue行的M~R列抢滩报名,即视为认领成功
【完成issue】已认领issue的同学,请同步在本issue评论区回复“已成功领取本issue”; 如7天内无提交任何进展包括不限于comment \ commit \ Pull Request,则将视为同学主动放弃issue,组委会将释放issue给下一位等候者。

数据库类型调研:是否支持ODBC

类型:数据库调研

统计支持odbc的dbms,统计信息包括但不限于dbms名称、dbms类型、是否支持事务、是否已被3TS-COO测试等。将统计信息整理成文档,提交pr,并合入仓库。

本issue为2024犀牛鸟开源人才培养活动专属issue,仅供在校大学生参与领取
【认领issue】在研学基地"issue营地"对应issue行的M~R列抢滩报名,即视为认领成功
【完成issue】已认领issue的同学,请同步在本issue评论区回复“已成功领取本issue”; 如7天内无提交任何进展包括不限于comment \ commit \ Pull Request,则将视为同学主动放弃issue,组委会将释放issue给下一位等候者。

功能添加:提取语句的时间间隔作为执行输入参数

类型:功能添加-参数提取

添加参数:执行时间间隔。现在3TS-COO执行语句会输出每条sql语句执行结束的时刻,我们希望执行结束后,能看到执行语句的时间间隔。完成相关分支,提交pr,经review后合并入分支。

希望得到:提取sql语句的执行时间间隔的功能

开发方式:fork分支coo-consistency-check代码到自己的仓库,clone后添加时间间隔参数的提取。

本issue为2024犀牛鸟开源人才培养活动专属issue,仅供在校大学生参与领取
【认领issue】在研学基地"issue营地"对应issue行的M~R列抢滩报名,即视为认领成功
【完成issue】已认领issue的同学,请同步在本issue评论区回复“已成功领取本issue”; 如7天内无提交任何进展包括不限于comment \ commit \ Pull Request,则将视为同学主动放弃issue,组委会将释放issue给下一位等候者。

功能添加:混合隔离级别异常检测

类型:功能添加-混合隔离级别异常检测

隔离级别是dbms为了平衡隔离性和事务的并发效率而制定的SQL标准。主流DBMS的隔离级别,由低到高包括读未提交,读已提交,可重复读和可串行执行。低的隔离级别,不同事务会互相干扰,而高的隔离级别,每个事务都近似于单独在执行,没有其他事务并发执行。在dbms中,每个session可以单独设置自己的隔离级别,这意味着,并发的多个事务,可能是在不同的隔离级别。

现在,3TSCOO检测的,是所有事务在同一隔离级别的情况。我们希望将3TSCOO扩展为每个事务可以拥有不同的隔离级别,并检测这些事务的结果有没有违反一致性。

希望得到:支持各事务在不同隔离级别下运行的新功能

开发方式:fork分支coo-consistency-check代码到自己的仓库,clone后在新分支上进行开发,然后提交pr合入仓库。相关代码位于(3TS/src/​dbtest/​src/mda_detect.py)

本issue为2024犀牛鸟开源人才培养活动专属issue,仅供在校大学生参与领取
【认领issue】在研学基地"issue营地"对应issue行的M~R列抢滩报名,即视为认领成功
【完成issue】已认领issue的同学,请同步在本issue评论区回复“已成功领取本issue”; 如7天内无提交任何进展包括不限于comment \ commit \ Pull Request,则将视为同学主动放弃issue,组委会将释放issue给下一位等候者。

安装配置指引

帮助3TS-Coo更好的配置。现在3TS-Coo使用odbc连接,然而一些数据库(例如mysql)的odbc官方下载,只支持ubuntu 22.04及以上的的版本,对于更低的版本例如20.04,需要通过源码编译的方式才能安装odbc。我们希望能够帮助低版本用户更好的配置框架。此外,还可以尝试在其他系统,如macOS上部署。

希望得到

  1. 普通要求:一份如何在22.04以下版本或其他环境(如macOS等)配置3TSCOO的文档
  2. 进阶要求:尝试使用docker容器化3TS-Coo。

本issue为2024犀牛鸟开源人才培养活动专属issue,仅供在校大学生参与领取
【认领issue】在研学基地"issue营地"对应issue行的M~R列抢滩报名,即视为认领成功
【完成issue】已认领issue的同学,请同步在本issue评论区回复“已成功领取本issue”; 如7天内无提交任何进展包括不限于comment \ commit \ Pull Request,则将视为同学主动放弃issue,组委会将释放issue给下一位等候者。

文档建设和优化:静态测试

类型:代码阅读与文档撰写

阅读目录(3TS/src/​dbtest/​src)下的case_cntl.cc、sqltest.cc、sql_cntl.cc三个文件中的代码,理解3TS-COO的静态测试是如何执行整个测试工作、如何与目标数据库连接并执行操作以及如何分析测试结果,形成完整的代码文档提交pr并合入仓库。

希望得到

  1. 三个文件的概述,包括代码功能、整体结构、与其他文件的关系和在项目中的作用。
  2. 每个文件的具体内容,包括声明和定义的对象、函数等。
  3. 其他你认为重要的内容。

开发方式:将coo-consistency-check代码clone到本地,阅读并调试,形成代码文档并提交到3TS/src/​dbtest/​src/doc

本issue为2024犀牛鸟开源人才培养活动专属issue,仅供在校大学生参与领取
【认领issue】在研学基地"issue营地"对应issue行的M~R列抢滩报名,即视为认领成功
【完成issue】已认领issue的同学,请同步在本issue评论区回复“已成功领取本issue”; 如7天内无提交任何进展包括不限于comment \ commit \ Pull Request,则将视为同学主动放弃issue,组委会将释放issue给下一位等候者。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.