naver / arcus-memcached

ARCUS memory cache server
https://github.com/naver/arcus
Apache License 2.0
70 stars 55 forks source link

INTERNAL: Set shutdown_time in shutdown_server and check in clock_handler #745

Closed namsic closed 6 months ago

namsic commented 7 months ago

๐Ÿ”— Related Issue

โŒจ๏ธ What I did

๐Ÿค” Others

INTERNAL: Use shutdown_time checked by clock_handler()

  1. shutdown api๊ฐ€ ๋ถˆ๋ฆฌ๋ฉด, arcus_zk_final() ์ˆ˜ํ–‰ ํ›„ ์ข…๋ฃŒ ์‹œ๊ฐ„(shutdown_time)์„ ์„ค์ •
  2. clock_handler()๊ฐ€ shutdown_time๊ณผ current_time ๋น„๊ตํ•˜์—ฌ memcached_shutdown flag ์„ค์ •

INTERNAL: Add shutdown_delay to arcus_zk_confs

  1. zk config์— shutdown_delay ํ•ญ๋ชฉ ์ถ”๊ฐ€
  2. default delay๋Š” zk์˜ session timeout์ด ๋˜๋„๋ก

INTERNAL: Add 'Z' option for set zookeeper shutdown delay

  1. ๊ตฌ๋™ ์˜ต์…˜ ์ถ”๊ฐ€
  2. arcus_zk_init() ํ˜ธ์ถœ ์‹œ ์ธ์ž๋กœ ๋„˜๊ฒจ shutdown_delay ์„ค์ •
namsic commented 6 months ago

SIGTERM ์ˆ˜์‹  ์‹œ ๋™์ž‘ ๋ณ€๊ฒฝ์€ ๋ณด๋ฅ˜ํ•˜๊ณ ,

shutdown ๋ช…๋ น์„ ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ์šฐ์„  ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.