Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M3DB client asynchronous replication #1859

Merged
merged 64 commits into from
Sep 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
bb63d1b
Parse multiple services from dynamic client config
simonrobb Aug 1, 2019
8862fc4
WIP added client opts support for multiple clusters
simonrobb Aug 6, 2019
7bb49bf
Returned to Options + MultiClusterOptions
simonrobb Aug 6, 2019
401dcc2
Added replication logic to replicatedSession
simonrobb Aug 7, 2019
7ee51db
Proxy Open method to sessions
simonrobb Aug 8, 2019
05bb376
Removed accidental glide.yaml
simonrobb Aug 9, 2019
d46548b
Move async flag outside etcd configuration
simonrobb Aug 13, 2019
ad06d1b
Simplified new client logic
simonrobb Aug 13, 2019
68b28bc
Added PooledWorkerPool todo
simonrobb Aug 13, 2019
dab93b8
Instrumented replicated session
simonrobb Aug 13, 2019
992f19b
Removed obselete param from etcd config
simonrobb Aug 13, 2019
7e81421
Updated obselete etcd test
simonrobb Aug 13, 2019
aa02658
Fixes from rebase
simonrobb Aug 14, 2019
4cc2768
Made replicated session more testable
simonrobb Aug 14, 2019
c4918a2
Added replicated session tests
simonrobb Aug 19, 2019
c5b4c1d
Reinstated proto schema constructor code
simonrobb Aug 20, 2019
4db7df2
Added support for multiple/async static configs
simonrobb Aug 20, 2019
16ff666
Updated import to src/x
simonrobb Aug 20, 2019
053d521
Pass correct Options to coordinator client
simonrobb Aug 20, 2019
825a730
Updated server config to use the syncronous cluster only
simonrobb Aug 26, 2019
f3b7e98
MultiClusterOptions => ReplicatedOptions
simonrobb Aug 26, 2019
96768cd
trying really hard to put a square peg in a round hole
simonrobb Aug 29, 2019
382f4da
Adapt query server logic to match replicated config
simonrobb Aug 29, 2019
7096e0e
Updated m3sch/query servers to use replicated options
simonrobb Aug 30, 2019
ede0f9c
Updated repair tests
simonrobb Aug 30, 2019
0c026d1
Removed loading proto schema from KVStore in config
simonrobb Sep 3, 2019
cb07eb7
missed a line
simonrobb Sep 3, 2019
3c0b0b0
Removed unused var
simonrobb Sep 3, 2019
0331f30
regen mocks
Sep 4, 2019
53fda20
fix integration compilation issues
Sep 4, 2019
3d86563
fix configuration test
Sep 4, 2019
e0f1528
fix more compilation issues
Sep 4, 2019
da9540f
fix more compilation issues
Sep 4, 2019
b249bc5
fix runtime interface
Sep 4, 2019
546994a
fix more compilation issue
Sep 5, 2019
f0b0e00
fix more compilation errors
Sep 5, 2019
a39bf5b
rename file + add copyright notice
Sep 5, 2019
e49f209
fix broken test
Sep 5, 2019
0d1d629
fix more tests
Sep 5, 2019
9b211f0
add prints and handle error
Sep 5, 2019
caeb4a0
fix docker integration tests
Sep 5, 2019
39aa45b
Improved environment config tests
simonrobb Sep 5, 2019
e7f4abb
Moved Validate call to environment config.Configure method
simonrobb Sep 5, 2019
2ffeba3
Grouped common methods in ReplicationOptions
simonrobb Sep 6, 2019
7d36d5e
Renamed test
simonrobb Sep 6, 2019
76cd952
Updated mocks
simonrobb Sep 6, 2019
fc6f528
prints
Sep 12, 2019
1ee19e2
remove prints
Sep 12, 2019
356290f
Merged ReplicatedOptions in Options
simonrobb Sep 12, 2019
fea7f66
Updated occurences of options in server code
simonrobb Sep 12, 2019
a6ca905
Fixed broken integration test
simonrobb Sep 12, 2019
14f5421
Further integration test fixes
simonrobb Sep 12, 2019
d93a242
Missed one
simonrobb Sep 12, 2019
1435bda
Removed replicationoptions from test
simonrobb Sep 12, 2019
1b744b5
Improved environment config validation tests
simonrobb Sep 12, 2019
e903316
Update environment config to reflect intended config schema
simonrobb Sep 12, 2019
fa5c4d9
removed redundant code
simonrobb Sep 12, 2019
0b6b701
Log error when closing async session
simonrobb Sep 12, 2019
1dbd67a
Validate in SyncCluster
simonrobb Sep 12, 2019
c9e408c
Skip chan output unless chan is allocated
simonrobb Sep 12, 2019
a7d7158
Avoid allocation in replicate
simonrobb Sep 12, 2019
6e00f60
Regen'd mocks
simonrobb Sep 13, 2019
8d030f6
Comment formatting
simonrobb Sep 13, 2019
52f4809
Nits
simonrobb Sep 13, 2019
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
23 changes: 14 additions & 9 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
version: "3.5"
simonrobb marked this conversation as resolved.
Show resolved Hide resolved
services:
cluster_a_dbnode01:
expose:
- "9000-9004"
- "2379-2380"
ports:
- "0.0.0.0:9012:9002"
- "0.0.0.0:9013:9003"
networks:
- backend
image: "m3dbnode_integration:${REVISION}"
environment:
- M3DB_HOST_ID=cluster_a_m3db_local_1
volumes:
- "./m3dbnode-cluster-a.yml:/etc/m3dbnode/m3dbnode.yml"
cluster_a_dbnode02:
expose:
- "9000-9004"
- "2379-2380"
ports:
- "0.0.0.0:9022:9002"
- "0.0.0.0:9023:9003"
networks:
- backend
image: "m3dbnode_integration:${REVISION}"
environment:
- M3DB_HOST_ID=cluster_a_m3db_local_2
volumes:
- "./m3dbnode-cluster-a.yml:/etc/m3dbnode/m3dbnode.yml"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 multi-cluster test ftw

cluster_a_coordinator01:
expose:
- "7201"
- "7203"
- "7204"
ports:
- "0.0.0.0:7201:7201"
- "0.0.0.0:7203:7203"
- "0.0.0.0:7204:7204"
networks:
- backend
image: "m3coordinator_integration:${REVISION}"
volumes:
- "./m3coordinator-cluster-a.yml/:/etc/m3coordinator/m3coordinator.yml"
cluster_b_dbnode01:
expose:
- "9000-9004"
- "2379-2380"
ports:
- "0.0.0.0:9112:9002"
- "0.0.0.0:9113:9003"
networks:
- backend
image: "m3dbnode_integration:${REVISION}"
environment:
- M3DB_HOST_ID=cluster_b_m3db_local_1
volumes:
- "./m3dbnode-cluster-b.yml:/etc/m3dbnode/m3dbnode.yml"
cluster_b_dbnode02:
expose:
- "9000-9004"
- "2379-2380"
ports:
- "0.0.0.0:9122:9002"
- "0.0.0.0:9123:9003"
networks:
- backend
image: "m3dbnode_integration:${REVISION}"
environment:
- M3DB_HOST_ID=cluster_b_m3db_local_2
volumes:
- "./m3dbnode-cluster-b.yml:/etc/m3dbnode/m3dbnode.yml"
cluster_b_coordinator01:
expose:
- "7201"
- "7203"
- "7204"
ports:
- "0.0.0.0:17201:7201"
- "0.0.0.0:17203:7203"
- "0.0.0.0:17204:7204"
networks:
- backend
image: "m3coordinator_integration:${REVISION}"
volumes:
- "./m3coordinator-cluster-b.yml:/etc/m3coordinator/m3coordinator.yml"
networks:
backend:
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
listenAddress:
type: "config"
value: "0.0.0.0:7201"

logging:
level: info

metrics:
scope:
prefix: "coordinator"
prometheus:
handlerPath: /metrics
listenAddress: 0.0.0.0:7203 # until https://github.com/m3db/m3/issues/682 is resolved
sanitization: prometheus
samplingRate: 1.0
extended: none

limits:
perQuery:
maxFetchedSeries: 100

clusters:
- namespaces:
- namespace: agg
type: aggregated
retention: 10h
resolution: 15s
- namespace: unagg
type: unaggregated
retention: 10h
client:
config:
service:
env: default_env
zone: embedded
service: m3db
cacheDir: /var/lib/m3kv
etcdClusters:
- zone: embedded
endpoints:
- cluster_a_dbnode01:2379
writeConsistencyLevel: majority
readConsistencyLevel: unstrict_majority

tagOptions:
idScheme: quoted
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
listenAddress:
type: "config"
value: "0.0.0.0:7201"

logging:
level: info

metrics:
scope:
prefix: "coordinator"
prometheus:
handlerPath: /metrics
listenAddress: 0.0.0.0:7203 # until https://github.com/m3db/m3/issues/682 is resolved
sanitization: prometheus
samplingRate: 1.0
extended: none

limits:
perQuery:
maxFetchedSeries: 100

clusters:
- namespaces:
- namespace: agg
type: aggregated
retention: 10h
resolution: 15s
- namespace: unagg
type: unaggregated
retention: 10h
client:
config:
service:
env: default_env
zone: embedded
service: m3db
cacheDir: /var/lib/m3kv
etcdClusters:
- zone: embedded
endpoints:
- cluster_b_dbnode01:2379
writeConsistencyLevel: majority
readConsistencyLevel: unstrict_majority

tagOptions:
idScheme: quoted
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
db:
logging:
level: info

tracing:
backend: jaeger
jaeger:
reporter:
localAgentHostPort: jaeger:6831
sampler:
type: const
param: 1

metrics:
prometheus:
handlerPath: /metrics
sanitization: prometheus
samplingRate: 1.0
extended: detailed

listenAddress: 0.0.0.0:9000
clusterListenAddress: 0.0.0.0:9001
httpNodeListenAddress: 0.0.0.0:9002
httpClusterListenAddress: 0.0.0.0:9003
debugListenAddress: 0.0.0.0:9004

hostID:
resolver: environment
envVarName: M3DB_HOST_ID

client:
writeConsistencyLevel: majority
readConsistencyLevel: unstrict_majority
config:
services:
- service:
env: default_env
zone: embedded
service: m3db
cacheDir: /var/lib/m3kv
etcdClusters:
- zone: embedded
endpoints:
- cluster_a_dbnode01:2379
- service:
env: default_env
zone: embedded
service: m3db
cacheDir: /var/lib/m3kv
etcdClusters:
- zone: embedded
endpoints:
- cluster_b_dbnode01:2379
async: true

gcPercentage: 100

writeNewSeriesAsync: true
writeNewSeriesLimitPerSecond: 1048576
writeNewSeriesBackoffDuration: 2ms

bootstrap:
# Intentionally disable peers bootstrapper to ensure it doesn't interfere with test.
bootstrappers:
- filesystem
- commitlog
- uninitialized_topology
commitlog:
returnUnfulfilledForCorruptCommitLogFiles: false

cache:
series:
policy: lru
postingsList:
size: 262144

commitlog:
flushMaxBytes: 524288
flushEvery: 1s
queue:
calculationType: fixed
size: 2097152

fs:
filePathPrefix: /var/lib/m3db

config:
service:
env: default_env
zone: embedded
service: m3db
cacheDir: /var/lib/m3kv
etcdClusters:
- zone: embedded
endpoints:
- cluster_a_dbnode01:2379
seedNodes:
initialCluster:
- hostID: cluster_a_m3db_local_1
endpoint: http://cluster_a_dbnode01:2380
Loading