Skip to content

Commit

Permalink
Add dev env and try fix github test
Browse files Browse the repository at this point in the history
  • Loading branch information
dispensable committed Jan 8, 2024
1 parent de706f4 commit 5c4060f
Show file tree
Hide file tree
Showing 15 changed files with 2,296 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .doubanpde/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
SHELL := /bin/bash
PROJECT_DIR := /home/project

env:
dpi -y -D "-y"
mkdir -p /tmp/gobeansproxy_prefix/proxy/

build:
go build -o gobeansproxy_bin

start-proxy: build
./gobeansproxy_bin -confdir .doubanpde/scripts/bdb/gobeansproxy/prefix-switch-cfg/conf/

start-riven-proxy: build
./gobeansproxy_bin -confdir .doubanpde/scripts/bdb/rivenbeansproxy/conf/

start-proxy-gc-trace: build
GODEBUG=gctrace=1 ./gobeansproxy_bin -confdir .doubanpde/scripts/bdb/gobeansproxy/prefix-switch-cfg/conf/

start-proxy-valgrind: build
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --error-limit=no --log-file=valgrind.log ./gobeansproxy_bin -confdir .doubanpde/scripts/bdb/gobeansproxy/prefix-switch-cfg/conf/

tail-log:
tail -f /tmp/gobeansproxy_prefix/proxy/*.log

cqlsh:
cqlsh -u cassandra -p cassandra
32 changes: 32 additions & 0 deletions .doubanpde/scripts/bdb/gobeansproxy/57980/conf/global.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
hstore:
data:
check_vhash: true
datafile_max_str: 4000M
flush_interval: 60
flush_wake_str: 10M
no_gc_days: 7
hint:
hint_index_interval_str: 32K
hint_merge_interval: 5
hint_no_merged: true
hint_split_cap_str: 1M
htree:
tree_height: 3
local:
home: /data
mc:
body_big_str: 5M
body_c_str: 0K
body_max_str: 50M
flush_max_str: 100M
max_key_len: 250
max_req: 16
server:
accesslog: /tmp/access.log
errorlog: /tmp/error.log
hostname: 127.0.0.1
listen: 0.0.0.0
port: 57980
threads: 4
webport: 57990
zk: 'NO'
26 changes: 26 additions & 0 deletions .doubanpde/scripts/bdb/gobeansproxy/57980/conf/route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
backup:
- 127.0.0.1:57983
main:
- addr: 127.0.0.1:57980
buckets: &id001
- '0'
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- a
- b
- c
- d
- e
- f
- addr: 127.0.0.1:57981
buckets: *id001
- addr: 127.0.0.1:57982
buckets: *id001
numbucket: 16
32 changes: 32 additions & 0 deletions .doubanpde/scripts/bdb/gobeansproxy/57981/conf/global.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
hstore:
data:
check_vhash: true
datafile_max_str: 4000M
flush_interval: 60
flush_wake_str: 10M
no_gc_days: 7
hint:
hint_index_interval_str: 32K
hint_merge_interval: 5
hint_no_merged: true
hint_split_cap_str: 1M
htree:
tree_height: 3
local:
home: /data
mc:
body_big_str: 5M
body_c_str: 0K
body_max_str: 50M
flush_max_str: 100M
max_key_len: 250
max_req: 16
server:
accesslog: /tmp/access.log
errorlog: /tmp/error.log
hostname: 127.0.0.1
listen: 0.0.0.0
port: 57981
threads: 4
webport: 57991
zk: 'NO'
26 changes: 26 additions & 0 deletions .doubanpde/scripts/bdb/gobeansproxy/57981/conf/route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
backup:
- 127.0.0.1:57983
main:
- addr: 127.0.0.1:57980
buckets: &id001
- '0'
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- a
- b
- c
- d
- e
- f
- addr: 127.0.0.1:57981
buckets: *id001
- addr: 127.0.0.1:57982
buckets: *id001
numbucket: 16
32 changes: 32 additions & 0 deletions .doubanpde/scripts/bdb/gobeansproxy/57982/conf/global.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
hstore:
data:
check_vhash: true
datafile_max_str: 4000M
flush_interval: 60
flush_wake_str: 10M
no_gc_days: 7
hint:
hint_index_interval_str: 32K
hint_merge_interval: 5
hint_no_merged: true
hint_split_cap_str: 1M
htree:
tree_height: 3
local:
home: /data
mc:
body_big_str: 5M
body_c_str: 0K
body_max_str: 50M
flush_max_str: 100M
max_key_len: 250
max_req: 16
server:
accesslog: /tmp/access.log
errorlog: /tmp/error.log
hostname: 127.0.0.1
listen: 0.0.0.0
port: 57982
threads: 4
webport: 57992
zk: 'NO'
26 changes: 26 additions & 0 deletions .doubanpde/scripts/bdb/gobeansproxy/57982/conf/route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
backup:
- 127.0.0.1:57983
main:
- addr: 127.0.0.1:57980
buckets: &id001
- '0'
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- a
- b
- c
- d
- e
- f
- addr: 127.0.0.1:57981
buckets: *id001
- addr: 127.0.0.1:57982
buckets: *id001
numbucket: 16
32 changes: 32 additions & 0 deletions .doubanpde/scripts/bdb/gobeansproxy/57983/conf/global.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
hstore:
data:
check_vhash: true
datafile_max_str: 4000M
flush_interval: 60
flush_wake_str: 10M
no_gc_days: 7
hint:
hint_index_interval_str: 32K
hint_merge_interval: 5
hint_no_merged: true
hint_split_cap_str: 1M
htree:
tree_height: 3
local:
home: /data
mc:
body_big_str: 5M
body_c_str: 0K
body_max_str: 50M
flush_max_str: 100M
max_key_len: 250
max_req: 16
server:
accesslog: /tmp/access.log
errorlog: /tmp/error.log
hostname: 127.0.0.1
listen: 0.0.0.0
port: 57983
threads: 4
webport: 57993
zk: 'NO'
26 changes: 26 additions & 0 deletions .doubanpde/scripts/bdb/gobeansproxy/57983/conf/route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
backup:
- 127.0.0.1:57983
main:
- addr: 127.0.0.1:57980
buckets: &id001
- '0'
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- a
- b
- c
- d
- e
- f
- addr: 127.0.0.1:57981
buckets: *id001
- addr: 127.0.0.1:57982
buckets: *id001
numbucket: 16
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
cassandra:
default_key_space: doubandb
default_table: kvstore
enable: true
hosts:
- 127.0.0.1:9042
timeout_ms: 1000
connect_timeout_ms: 3000
write_timeout_ms: 1000
retry_num: 3
reconnect_interval_sec: 180
max_conn_for_getm: 10
num_conns: 10
username: "doubandb_test"
password: "doubandb_test"
consistency: "local_one"
prefix_table_dispatcher_cfg:
# if not enable will use default keyspace and table
enable: true
static:
# dispatch prefix1 key to table table_name1
kvstore_ark:
- "/ark"
cfg_table: bdb_prefix_table_finder
cfg_keyspace: doubandb
prefix_rw_dispatcher_cfg:
enable: true
static:
# dispatch prefix /test_prefix_c/ to dual write
br1w1cr0w1:
- "/test_prefix_c/"
- "/test_prefix_d/"
- "/arkark/"
br0w0cr1w1:
- "test_"
cfg_table: bdb_prefix_rw_switcher
cfg_keyspace: doubandb
default_storage: "br0w1cr1w1"
dual_write_err_cfg:
dump_to_dir: /tmp/gobeansproxy_prefix/proxy/
log_file_name: dual_write_err.log
logger_level: "INFO"
rotate_size_mb: 100
compress: true
max_ages: 7
max_backups: 100
dstore:
enable: true
connect_timeout_ms: 300
dial_fail_silence_ms: 5000
error_seconds: 10
item_size_stats: 4096
max_connect_errors: 3
max_free_conns_per_host: 20
n: 3
r: 1
read_timeout_ms: 2000
response_time_min: 4000
response_time_seconds: 10
score_deviation: 10
w: 2
write_timeout_ms: 2000
mc:
body_big_str: 5M
body_c_str: 0K
body_max_str: 50M
max_key_len: 250
max_req: 16
proxy:
accesslog: /tmp/gobeansproxy_prefix/proxy/access.log
errorlog: /tmp/gobeansproxy_prefix/proxy/error.log
hostname: 127.0.0.1
listen: 0.0.0.0
port: 47907
staticdir: /var/lib/gobeansproxy
threads: 8
webport: 47910
zkpath: /gobeansproxy/test
zkservers:
- zk1:2181
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
backup:
- 127.0.0.1:57983
main:
- addr: 127.0.0.1:57980
buckets: &id001
- '0'
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- a
- b
- c
- d
- e
- f
- addr: 127.0.0.1:57981
buckets: *id001
- addr: 127.0.0.1:57982
buckets: *id001
numbucket: 16
Loading

0 comments on commit 5c4060f

Please sign in to comment.