Skip to content

Commit

Permalink
rustest: added limits to docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
lololozhkin committed Nov 4, 2023
1 parent 2b89ec3 commit 4953eca
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
28 changes: 24 additions & 4 deletions services/rustest/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,37 @@ services:
- '--initial-cluster-token=etcd-cluster-token'
volumes:
- etcd1:/etcd_data
ports:
- 2379:2379
restart: always
restart: unless-stopped
ulimits:
nofile:
soft: 32768
hard: 32768
logging:
options:
max-file: "2"
max-size: "5m"
mem_limit: 1G
memswap_limit: 1G
cpu_count: 1

rustest:
build: "./"
ports:
- 13337:3000
restart: always
restart: unless-stopped
environment:
- ETCD_HOST=http://etcd:2379
ulimits:
nofile:
soft: 32768
hard: 32768
logging:
options:
max-file: "2"
max-size: "5m"
mem_limit: 1G
memswap_limit: 1G
cpu_count: 1

volumes:
etcd1:
2 changes: 1 addition & 1 deletion services/rustest/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl ETCDRustestStorage {
current_min_revision = resp.kvs.last().unwrap().create_revision + 1;

let mut kvs: &[KeyValue] = &resp.kvs;
while kvs.len() > 0 {
while !kvs.is_empty() {
let offset_bound_revision = kvs.first().unwrap().create_revision;

offset_to_revision.insert(current_offset as u64, offset_bound_revision);
Expand Down

0 comments on commit 4953eca

Please sign in to comment.