Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
678aad1
Fix DA workload
Slontia Jan 7, 2021
7e6cbd1
Output abort histories with DA workload
Slontia Jan 12, 2021
7dd7a43
Add DLI and DTA algorithm
Slontia Jan 12, 2021
0111b72
Upload DLI & DTA algorithm source files on deneva
Slontia Jan 13, 2021
063baa1
Support generating histories containing ScanOdd operation with Traver…
Slontia Jan 13, 2021
64da4d1
Update config template for 3TS-DA
Slontia Jan 13, 2021
76f7af1
Upload da_schema.txt for Deneva
Slontia Jan 13, 2021
42b0317
Catch Deneva nn::exception with DA workload
Slontia Jan 15, 2021
4e96073
Exit iothread and close socket when DA workload server received all h…
Slontia Jan 19, 2021
03eaa21
Fix destroy Transport alloc-dealloc-mismatch
Slontia Jan 19, 2021
da06b25
Make last_da_query_time and last_da_recv_query_time atomic
Slontia Jan 19, 2021
8158f4b
Fix memory overflow
Slontia Jan 19, 2021
65bd1f2
Add validation logical for DLI and DTA algorithm on Deneva
Slontia Jan 20, 2021
5482198
Fix arithmetic exception when init DtaTimeTable
Slontia Jan 20, 2021
296af31
Go through all validated txn with DLI algorithm in Deneva
Slontia Jan 20, 2021
485a28a
Remove AbortThread when DA workload on Deneva
Slontia Jan 21, 2021
49adba8
Fix used variable when SET_AFFINITY is false
Slontia Jan 22, 2021
62aadad
Fix DA workload OutputThread not exit
Slontia Jan 22, 2021
8e5d364
Improve DA Workload performance by recorrect the index name
Slontia Jan 22, 2021
98e5e17
Set thread count 1 when using DA workload
Slontia Jan 25, 2021
cfda37f
Fix DLI_OCC compare transactions for long time
Slontia Jan 25, 2021
6214c15
Upload English introductions about 3TS
Jan 25, 2021
1065ba8
Merge pull request #2 from freeqoop/dev
zhanhaozhao Jan 26, 2021
8bb1f6f
Remove runcl debug outputs
Slontia Jan 28, 2021
5ede8dc
Fix DLI_DTA memory leak
Slontia Jan 28, 2021
310379b
Assign upper with lower + 1 when transaction commits successfully to …
Slontia Jan 29, 2021
2de05c9
Fix code format
Slontia Jan 29, 2021
97692ae
Regard Scan as multiple Read in DA workload in Deneva
Slontia Jan 29, 2021
28b1d8e
Fix code format
Slontia Jan 29, 2021
7b5c769
Fix DLI missed judgment in Deneva
Slontia Jan 29, 2021
303c2d8
Support config with_write in 3TS-DA
Slontia Feb 1, 2021
9a783d8
Add DLI to 3TS-DA
Slontia Feb 2, 2021
7dc0f15
Update wset version when transaction over in DLI algorithm in Deneva
Slontia Feb 2, 2021
1ac7f44
Compare current transaction's start_ts with concurrency transaction's…
Slontia Feb 3, 2021
43c3b62
Release TxnManager when transaction aborts in DA workload in Deneva
Slontia Feb 3, 2021
95ccd0c
Fix DLI anomaly leak by not comparing commit_ts and start_ts in Deneva
Slontia Feb 3, 2021
44ad3ba
Update DLI algorithm in 3TS-DA
Slontia Feb 3, 2021
388c995
Fix TIMESTAMP algorithm crash at update_buffer in Deneva
Slontia Feb 8, 2021
d8e8ea6
Skip get_transaction_manager when transaction already abort in DA wor…
Slontia Feb 8, 2021
b777464
Fix txn_id is UINT64_MAX when update time table in Deneva
Slontia Feb 8, 2021
3a8cedc
Delay operation when return WAIT in DA workload in Deneva
Slontia Feb 9, 2021
c1789ba
Add W1C2 precedence in conflict serializable algorithm in 3TS-DA
Slontia Feb 16, 2021
110f74c
Classify anomaly in Conflict Serializable Algorithm in 3TS-DA
Slontia Feb 22, 2021
fa33f85
Output history to abort file only when operation is not Abort in DA w…
Slontia Feb 22, 2021
e0681c2
Upload extend_enum.h
Slontia Feb 22, 2021
5ff6b11
Fix unknown anomaly type in ConflictSerializableAlgorithm
Slontia Feb 23, 2021
8a45587
Update anomaly name in ConflictSerializableAlgorithm
Slontia Feb 23, 2021
bcb6ff0
Make entend_enum functions template
Slontia Feb 23, 2021
18592eb
Support tcl_position NOWHERE && Fix STEP anomaly detect in ConflictSe…
Slontia Feb 23, 2021
20d2343
Fix unknown anomaly in ConflictSerializableAlgorithm
Slontia Feb 24, 2021
b4070e6
Change strings list from std::vector to std::array in extend_enum.h
Slontia Mar 10, 2021
a7b720b
Divide DLI_IDENTIFY from ConflictSerializableAlgorithm
Slontia Mar 10, 2021
2c2a38b
Remove can_be_ww in DLI_IDENTIFY
Slontia Mar 11, 2021
81fe034
Regard 2 items, 3 or 4 transactions anomaly as Step in DLI_IDENTIFY
Slontia Mar 11, 2021
b8b8326
Identify order of two variable anomaly in DLI_IDENTIFY
Slontia Mar 11, 2021
a628ff6
Rename Intermediate Write to Full Write
Slontia Mar 11, 2021
3a49202
Merge branch 'dev' into dev-fix-da-workload
Slontia Mar 18, 2021
4e39d49
Compile DLI_IDENTIFY success with C++17
Slontia Mar 18, 2021
615c0fb
DLI_IDENTIFY on Deneva can check anomaly existence precisely
Slontia Mar 19, 2021
72ae89b
Identify anomaly type with DLI_IDENTIFY in Deneva
Slontia Mar 19, 2021
9dd9982
Output anomaly type counts with DLI_IDENTIFY in Deneva
Slontia Mar 22, 2021
8c9072d
Fix DLI_IDENTIFY not print commit histories in Deneva DA Workload
Slontia Mar 22, 2021
49cce21
Decouple DLI_IDENTIFY algorithms from Deneva
Slontia Mar 25, 2021
280e94e
Fix DLI_IDENTIFY txn leak in Deneva DA workload
Slontia Mar 25, 2021
74bffd2
Add anomaly-identify Interactive applet
Mar 25, 2021
2dc52b2
Fix DLI_IDENTIFY_2 miss anomaly on Deneva
Slontia Mar 25, 2021
c0a9877
Print anomaly type with DLI_IDENTIFY_2 on Deneva
Slontia Mar 26, 2021
e0c8d22
Fix skip row_manager init
Slontia Mar 26, 2021
17950f1
Fix CheckConcurrencyTxnEmpty slow by clean cc_txns_
Slontia Mar 26, 2021
90ef472
Add all help info; fix anomaly identify
Mar 26, 2021
1ee235d
Fix unknown anomaly in DLI_IDENTIFY_2 in Deneva
Slontia Mar 26, 2021
2853798
Add 3TS-DAI applet
Mar 27, 2021
3c997fd
Fix conflict
Mar 27, 2021
e15ec8a
Refactor according to comments
Mar 27, 2021
665bd15
Refactor according to comments 2
Mar 27, 2021
2d7932f
Modify algorithm name in anomaly identifier
Mar 27, 2021
4026097
Merge branch 'dev-anomaly-identify' into dev-fix-da-workload
Slontia Mar 27, 2021
05d11c2
Merge pull request #4 from Tencent/dev-fix-da-workload
Slontia Mar 28, 2021
6634221
Update Help Info
Mar 28, 2021
60dbad8
Update type and subtype's definition
Mar 29, 2021
2444a18
Update DLI's name
Mar 29, 2021
fdcfcb4
Fix TPCC workload compiling error
Slontia Mar 30, 2021
4e27c5f
Add Easter egg; Put 'AnomalyType' and 'PreceType' to new file; Alter …
Mar 30, 2021
0f38906
Fix format
Mar 30, 2021
125fad8
Fix format 2
Mar 30, 2021
655372c
Merge pull request #5 from Tencent/dev-DAI
Slontia Mar 30, 2021
88103ec
Remove DLI from Deneva
Slontia Mar 30, 2021
cdcfc63
Add copyright for new source files in Deneva
Slontia Mar 30, 2021
7b148f0
Do not specify g++ path in Deneva Makefile
Slontia Mar 30, 2021
1385581
Fix false rollback in Deneva SSI
Slontia Mar 30, 2021
bc85b70
Fix assertion failed in Deneva YCSB workload
Slontia Mar 30, 2021
c9d6468
Fix close socket error by not destroying socket after io_thread exit
Slontia Mar 31, 2021
e0f4d65
Support UNI_DLI_IDENTIFY_CHAIN in 3TS-DA
Mar 31, 2021
e85b3b2
Merge pull request #7 from Tencent/dev-ssi
zhanhaozhao Mar 31, 2021
d0adfa8
DLI_IDENTIFY consider write abort when identify dirty write
Slontia Mar 31, 2021
a4f05a0
Alter #define ... -> #pragma once; Update Lost Update and IAT Step ex…
Apr 1, 2021
c702d9d
Merge branch 'dev-DAI' into dev-dli
Slontia Apr 1, 2021
62b8d10
Support \g a, b, c
Apr 1, 2021
1c29f44
Rename DLI_IDENTIFY algorithm names in Deneva
Slontia Apr 1, 2021
ac12b10
Merge pull request #6 from Tencent/dev-dli
Slontia Apr 1, 2021
fa8b3e3
Merge branch 'dev' into dev-DAI
Apr 1, 2021
5ed10da
Merge pull request #8 from Tencent/dev-DAI
fishheader Apr 1, 2021
6d1db02
Add file: 3TS-DAI-Tools.pdf
Slontia Apr 7, 2021
65df5f0
Merge pull request #11 from Tencent/add-file-for-3TS-DAI
Slontia Apr 7, 2021
0a193a8
Add images: DAI*.png
fishheader Apr 7, 2021
669d337
Move DAI*.png into 3ts_dai_image
Slontia Apr 7, 2021
8de3a2d
Delete useless images
Slontia Apr 7, 2021
dd17948
Add Markdown: 3TS-DAI-Tools
Slontia Apr 7, 2021
00d5493
Merge pull request #12 from Tencent/add-md-file-for-3TS-DAI
Slontia Apr 7, 2021
bd5a6d0
TDSQL team created the project.
lhxdb Apr 26, 2021
30b41f6
Update README.md
lhxdb Apr 26, 2021
00f18a7
data anomalies in DBMS (English Version)
lhxdb Oct 27, 2021
13f4849
Update README.md
AxingguChen Jul 17, 2022
4319711
Merge pull request #26 from Tencent/AxingguChen-patch-1
lhxdb Jul 17, 2022
7ccef53
Update config.h
AxingguChen Dec 25, 2024
6801c6b
Update License
AxingguChen Jul 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ __*
*.o
*.bak
core*
3ts
rundb
runcl
3TS
3TS-DAI
contrib/deneva/obj/deps
3 changes: 1 addition & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Tencent is pleased to support the open source community by making Tencent Transaction Processing Testbed System-(3TS--腾讯事务处理技术验证系统) available.

Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. The below software in this distribution may have been modified by THL A29 Limited ("Tencent Modifications"). All Tencent Modifications are Copyright (C) THL A29 Limited.

Copyright © 2020 Tencent Holdings Limited, a Tencent company. All rights reserved. The software in this distribution may have been modified by Tencent Holdings Limited (“Tencent Modifications”). All Tencent Modifications are Copyright © Tencent Holdings.
Tencent Transaction Processing Testbed System-(3TS--腾讯事务处理技术验证系统) is licensed under the following license, except for the third-party components listed below.

License for Tencent Transaction Processing Testbed System-(3TS--腾讯事务处理技术验证系统) :
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![](https://img.shields.io/badge/license-GPLv3-brightgreen)

**Tencent Transaction Processing Testbed System (3TS)** that is jointly developed by Tencent's CynosDB (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.
**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](doc/en/announcement.md).

Expand All @@ -16,25 +16,32 @@ If you want to better understand the aims of our project, please view [3TS opens

## Dependence

### 3TS-Coo
A consistency verification system. Please check out the newest update on branch ['coo-consistency-check'](https://github.com/Tencent/3TS/tree/coo-consistency-check).

We update our result on [report webpage](https://axingguchen.github.io/3TS/).

### 3TS-DA
A static random history generator. Please check out the newest update on branch ['dev'](https://github.com/Tencent/3TS/tree/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'](https://github.com/Tencent/3TS/tree/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 `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 `./t3s --conf_path=config.cfg` to execute test. The test result file will be generated when test is over.
- Run `./3TS --conf_path=config.cfg` to execute test. The test result file will be generated when test is over.

## Principle

Expand Down Expand Up @@ -62,6 +69,7 @@ If you want to better understand the aims of our project, please view [3TS opens
- `"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"`
Expand Down
9 changes: 6 additions & 3 deletions config.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ BenchmarkRun = {
algorithms = ("SSI"); // concurrent algorithms
history_num = 1024L; // number of histories to generate
with_abort = true; // generate history with Abort operation
tail_tcl = true; // generate TCL operation only on the tail of history
tcl_position = "TAIL"; // generate TCL operation in history position ("TAIL", "ANYWHERE", "NOWHERE")
os = "cout"; // filename the benchmark result output to, "cout" means standard output
};

Expand All @@ -35,7 +35,9 @@ TraversalGenerator = {
subtask_num = 10L; // number of subtasks
subtask_id = 0L; // the id of subtask to run
with_abort = true; // generate history with Abort operation
tail_tcl = false; // generate TCL operation only on the tail of history
with_scan = "NONE_HAVE"; // generate history with ScanOdd operation ("NONE_HAVE", "ALL_HAVE", "NO_LIMIT")
with_write = "NO_LIMIT"; // generate history with Write operation ("NONE_HAVE", "ALL_HAVE", "NO_LIMIT")
tcl_position = "ANYWHERE"; // generate TCL operation in history position ("TAIL", "ANYWHERE", "NOWHERE")
allow_empty_trans = false; // transactions generated can be without DML operations
dynamic_history_len = false; // number of DML operation can be less than <max_dml>
};
Expand All @@ -52,7 +54,8 @@ RandomGenerator = {
max_dml = 2L; // max number of DML operations
history_num = 100L; // number of histories to generate
with_abort = true; // generate history with Abort operation
tail_tcl = true; // generate TCL operation only on the tail of history
with_scan = "NONE_HAVE"; // generate history with ScanOdd operation ("NONE_HAVE", "ALL_HAVE", "NO_LIMIT")
tcl_position = "TAIL"; // generate TCL operation in history position ("TAIL", "ANYWHERE", "NOWHERE")
allow_empty_trans = false; // transactions generated can be without DML operations
dynamic_history_len = false; // number of DML operation can be less than <max_dml>
}
Expand Down
14 changes: 10 additions & 4 deletions contrib/deneva/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
CC=/usr/bin/g++
CFLAGS=-Wall -Werror -std=c++11 -g3 -ggdb -O0 -fno-strict-aliasing -fno-omit-frame-pointer -D_GLIBCXX_USE_CXX11_ABI=0
CC=g++
CFLAGS=-Wall -Werror -std=c++17 -static-libstdc++ -g3 -ggdb -O0 -fno-strict-aliasing -fno-omit-frame-pointer -D_GLIBCXX_USE_CXX11_ABI=0 -static-libasan -fsanitize=address
#CFLAGS += -fsanitize=address -fno-stack-protector -fno-omit-frame-pointer
NNMSG=./nanomsg-0.5-beta

.SUFFIXES: .o .cpp .h .cc

SRC_DIRS = ./ ./benchmarks/ ./client/ ./concurrency_control/ ./storage/ ./transport/ ./system/ ./statistics/#./unit_tests/
DEPS = -I. -I./benchmarks -I./client/ -I./concurrency_control -I./storage -I./transport -I./system -I./statistics #-I./unit_tests
SRC_DIRS = ./ ./benchmarks/ ./client/ ./concurrency_control/ ./unified_concurrency_control/ ./storage/ ./transport/ ./system/ ./statistics/#./unit_tests/
DEPS = -I. -I./benchmarks -I./client/ -I./concurrency_control -I./unified_concurrency_control/ -I./storage -I./transport -I./system -I./statistics #-I./unit_tests

CFLAGS += $(DEPS) -D NOGRAPHITE=1 -Wno-sizeof-pointer-memaccess
LDFLAGS = -Wall -L. -L$(NNMSG) -Wl,-rpath -pthread -lrt -lnanomsg -lanl -lcurl -lprotobuf -lpthread
Expand Down Expand Up @@ -55,6 +55,8 @@ unit_test : $(OBJS_UNIT)
$(CC) -c -DSTATS_ENABLE=false $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: concurrency_control/%.cpp
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: unified_concurrency_control/%.cpp
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: client/%.cpp
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: %.cpp
Expand All @@ -79,6 +81,8 @@ rundb : $(OBJS_DB)
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: concurrency_control/%.cpp
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: unified_concurrency_control/%.cpp
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: client/%.cpp
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: %.cpp
Expand All @@ -103,6 +107,8 @@ runcl : $(OBJS_CL)
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: concurrency_control/%.cpp
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: unified_concurrency_control/%.cpp
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: client/%.cpp
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
./obj/%.o: %.cpp
Expand Down
42 changes: 42 additions & 0 deletions contrib/deneva/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,45 @@ The DBMS can be run with
./runcl -nid[M]

where N and M are the ID of a server and client, respectively


DA
---
The DBMS can use DA workload. This workload will executes a given sequence of transaction operations and prints out the actual execution results.

To use this workload, you can only use a single node, a single worker thread, and a single messaging thread.
Here are some of the configurations that need to be modified in the `config.h` file

#define NODE_CNT 1
#define THREAD_CNT 1
#define REM_THREAD_CNT 1
#define SEND_THREAD_CNT 1

#define CLIENT_NODE_CNT 1
#define CLIENT_THREAD_CNT 1
#define CLIENT_REM_THREAD_CNT 1
#define CLIENT_SEND_THREAD_CNT 1

#define WORKLOAD DA

In addition, the client and server need to be placed only on one machine!
Only two lines of the same IP address can be written in the `ifconfig.txt` file, and this IP address is the machine you want to test.
Here is an example of this file:

10.77.110.148
10.77.110.148

After modifying all the above parameters, the next step is to determine the sequence of transaction operations to be performed. This sequence needs to be written in the `input.txt` file. Examples are as follows:

W0a R1b W1a R1c C1 W0b C0
R2a R3b W2b W3a C2 C3

A row represents a sequence.

Now to test, you need to perform the following command on the machine which you want to test in:

./rundb -nid0
./runcl -nid1

Finally, check the results, which are output in the `commit_histroy.txt` file.
Compare whether the actual execution results in the file meet the logic of your concurrency control algorithm. If so, it is proved that the algorithm is implemented correctly.
79 changes: 46 additions & 33 deletions contrib/deneva/benchmarks/da.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "txn.h"
#include "wl.h"
#include "creator.h"
#include "da_query.h"
#include <optional>

class DAQuery;
class DAQueryMessage;
Expand All @@ -15,51 +17,62 @@ class table_t;
class INDEX;
class DAQuery;

extern std::string DA_history_mem;
extern std::vector<Message*> DA_delayed_operations;
extern bool abort_history;
extern ofstream commit_file;
extern ofstream abort_file;
extern std::optional<ttts::Path> g_da_cycle;

class DAWorkload : public Workload {
public:
RC init();
RC init_table();
RC init_schema(const char* schema_file);
RC get_txn_man(TxnManager*& txn_manager);
void reset_tab_idx();
table_t* t_datab;
public:
RC init();
RC init_table();
RC init_schema(const char* schema_file);
RC get_txn_man(TxnManager*& txn_manager);
void reset_tab_idx();
table_t* t_datab;
uint64_t nextstate;
INDEX* i_datab;
bool** delivering;
INDEX* i_datab;
bool** delivering;

private:
//void init_tab_DAtab(int id, uint64_t w_id);
void init_tab_DAtab();
static void* threadInitDAtab(void* This);
private:
//void init_tab_DAtab(int id, uint64_t w_id);
void init_tab_DAtab();
static void* threadInitDAtab(void* This);
};

struct DA_thr_args {
DAWorkload* wl;
UInt32 id;
UInt32 tot;
DAWorkload* wl;
UInt32 id;
UInt32 tot;
};

class DATxnManager : public TxnManager {
public:
void init(uint64_t thd_id, Workload* h_wl);
void reset();
RC acquire_locks();
RC run_txn();
RC run_txn_post_wait();
RC run_calvin_txn();
public:
void init(uint64_t thd_id, Workload* h_wl);
void reset();
RC acquire_locks();
RC run_txn();
RC run_txn_post_wait();
RC run_calvin_txn();

void copy_remote_items(DAQueryMessage* msg);
void copy_remote_items(DAQueryMessage* msg);
void set_not_waiting() { is_waiting_ = false; }

private:
DAWorkload* _wl;
volatile RC _rc;
row_t* row;
private:
DAWorkload* _wl;
volatile RC _rc;
row_t* row;
bool is_waiting_;
std::vector<DAQuery> skip_queries_;

uint64_t next_item_id;
uint64_t next_item_id;

bool is_done();
bool is_local_item(uint64_t idx);
RC send_remote_request();
RC run_delivery(DAQuery* query);
bool is_done();
bool is_local_item(uint64_t idx);
RC send_remote_request();
RC run_delivery(DAQuery* query);
RC process_query(const DAQuery* const da_query);
};
#endif
2 changes: 0 additions & 2 deletions contrib/deneva/benchmarks/da_block_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ void DABlockQueue::push_data(BaseQuery* data)
while(IsFull())
{
NotifyConsume();
std::cout<<"queue full,notify consume data,product stop!!"<<std::endl;
ProductWait();
}

Expand All @@ -68,7 +67,6 @@ BaseQuery* DABlockQueue::pop_data()
while(IsEmpty())
{
NotifyProduct();
std::cout<<"queue empty,notify product data,consume stop!!"<<std::endl;
list<BaseQuery*>().swap(q);
ConsumeWait();
}
Expand Down
14 changes: 4 additions & 10 deletions contrib/deneva/benchmarks/da_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,17 @@ BaseQuery * DAQueryGenerator::create_query(Workload * h_wl, uint64_t home_partit
t_version[DAQ_t->item_id]++;
DAQ_t->write_version=t_version[DAQ_t->item_id];
da_gen_qry_queue.push_data(DAQ_t);
/*
while(!(pu=da_query_queue.push(DAQ_t)));
if(pu)
printf("true ");
else
printf("false ");
fflush(stdout);
*/

}
free(t_version);
seq_num++;
printf("product: %lu\n",seq_num);
fflush(stdout);
};

printf("start generating histories\n");
creator.DeliverActionSequences(handle);
printf("history thread exit\n");
da_gen_qry_queue.push_data(nullptr); // tell consumer no histories anymore
printf("finish generating histories, total product: %lu\n", seq_num);
fflush(stdout);
return ret;
}
7 changes: 7 additions & 0 deletions contrib/deneva/benchmarks/da_schema.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//size,type,name
TABLE=DAtab
8,int64_t,id
8,int64_t,value

INDEX=DAtab_IDX
DAtab,0
Loading