Skip to content

Commit 5362a91

Browse files
authored
Fix online bugs 2 (#232)
* update conf files. * add multi connector conf. * fixing. * Add conf priorities. * update doc.
1 parent 40e074d commit 5362a91

File tree

14 files changed

+80
-59
lines changed

14 files changed

+80
-59
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
env:
77
CC: gcc-4.9
88
CXX: g++-4.9
9-
ver: dtc-v2.1.3-rc3
9+
ver: dtc-v2.1.3
1010

1111
jobs:
1212
build:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ The DTC system consists of the following components:
3131
## Performance
3232
* DTC can process 90,000 QPS of query requests at single-core cpu & single dtc instance.
3333
* DTC can provide above 3,000,000 QPS query capability with above 99.9% hit rate and less than 200 μs response time in actual distributed scenarios.
34+
* Layered Storage is able to provide about 1,000 QPS write capability with above 99.9% per single instance.
3435
## How to Build
3536
DTC provides docker images for quick start:
3637
* Start server docker:<br/>

conf/dtc.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
props:
55
log.level: debug
66
listener.port.dtc: 20015
7-
listener.port.extension: 2002
87
shm.mem.size: 100 #MB
8+
hash.custom: Yes
9+
hash.custom.module: ../lib/key-hash.so
10+
hash.custom.functon: "StringHash(1,128)"
11+
connector.procs: 10
912

1013
data_lifecycle:
1114
single.query.count: 10
1215
lifecycle.tablename: 'data_lifecycle_table'
13-
rule.sql: 'uid = 0'
1416
rule.cron: '0 */1 * * * ?'
1517

1618
connection: &connection

dockerfiles/devel/dtc.dbaddition.ext.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ props:
99
log.level: debug
1010
listener.port.dtc: 20015
1111
shm.mem.size: 100 #MB
12+
connector.procs: 1
1213

1314
connection: &connection
1415
addr: 127.0.0.1:3307

dockerfiles/devel/dtc.dbaddition.s1.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ props:
77
log.level: debug
88
listener.port.dtc: 20015
99
shm.mem.size: 100 #MB
10+
connector.procs: 1
1011

1112
connection: &connection
1213
addr: 127.0.0.1:3307

dockerfiles/devel/dtc.dbaddition.s2.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ props:
99
log.level: debug
1010
listener.port.dtc: 20015
1111
shm.mem.size: 100 #MB
12+
connector.procs: 1
1213

1314
connection: &connection
1415
addr: 127.0.0.1:3307

dockerfiles/devel/dtc.dbaddition.s3.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ props:
77
log.level: debug
88
listener.port.dtc: 20015
99
shm.mem.size: 100 #MB
10+
connector.procs: 1
1011

1112
connection: &connection
1213
addr: 127.0.0.1:3307

dockerfiles/devel/dtc.layered.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ props:
77
log.level: debug
88
listener.port.dtc: 20015
99
shm.mem.size: 100 #MB
10+
connector.procs: 1
1011

1112
connection: &connection
1213
addr: mysql:3306

src/libs/common/config/dbconfig.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -652,13 +652,13 @@ int DbConfig::get_dtc_config(YAML::Node dtc_config, DTCConfig* raw, int i_server
652652
}
653653
}
654654
/* Helper number alter */
655-
m->gprocs[0] = raw->get_int_val(NULL, "Procs", 1);
655+
m->gprocs[0] = dtc_config["props"]["connector.procs"].as<int>();
656656
if (m->gprocs[0] < 1)
657657
m->gprocs[0] = 0;
658-
m->gprocs[1] = raw->get_int_val(NULL, "WriteProcs", 1);
658+
m->gprocs[1] = dtc_config["props"]["connector.procs"].as<int>();
659659
if (m->gprocs[1] < 1)
660660
m->gprocs[1] = 0;
661-
m->gprocs[2] = raw->get_int_val(NULL, "CommitProcs", 1);
661+
m->gprocs[2] = dtc_config["props"]["connector.procs"].as<int>();
662662
if (m->gprocs[2] < 1)
663663
m->gprocs[2] = 0;
664664
/* Helper Queue Size */

src/rule/re_comm.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@ typedef struct _expr_properity{
99
int condition_num;
1010
}expr_properity;
1111

12+
#define YAML_DTC_BUFFER "YAML_DTC_BUFFER"
13+
#define YAML_DTC_RULES "YAML_DTC_RULES"
14+
#define YAML_DTC_KEY_TYPE "YAML_DTC_KEY_TYPE"
15+
#define YAML_DTC_KEY_STRING "YAML_DTC_KEY_STRING"
16+
1217
#endif

0 commit comments

Comments
 (0)