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

[persistence] 동적 persistence on/off 기능 필요성 검토 #345

Open
MinWooJin opened this issue Oct 22, 2019 · 3 comments
Open

[persistence] 동적 persistence on/off 기능 필요성 검토 #345

MinWooJin opened this issue Oct 22, 2019 · 3 comments

Comments

@MinWooJin
Copy link
Contributor

persistence 를 동적으로 on/off 하는 기능의 필요성을 검토하고,
필요 시 개발한다.

@MinWooJin MinWooJin added this to 목록 in Persistence via automation Oct 22, 2019
@MinWooJin
Copy link
Contributor Author

동적 on/off 기능의 동작 방법

  • command
<config> <persistence> <enable> <config file path>
<config> <persistence> <disable>

config file은 default_engine.conf file을 의미하며, 기본 설정이 모두 있어야 한다.

  • persistence disable -> enable
    • config persistence enable file_path command
    • engine 내부에서 config file open & parsing & 각 설정의 적절성 확인
    • persistence module init & 필요 daemon thread start
    • persistence enable
      • cache lock
      • first snapshot
      • persistence config true 설정으로 cache lock 해제 이후 operation 부터 영속성 제공
      • unlock cache
    • OK 응답
  • persistence enable -> disable
    • config persistence disable command
    • persistence disable
      • cache lock
      • persistence config false 설정으로 cache lock 해제 이후 operation 부터 영속성 제공하지 않음
      • unlock cache
    • persistence module destroy & daemon thread stop
    • OK 응답

@MinWooJin
Copy link
Contributor Author

@jhpark816
동적 persistence on/off 기능 설계에 대해 위와 같이 정리 해 봤습니다.
검토해 주시면 좋을 것 같습니다.

@MinWooJin MinWooJin moved this from 목록 to 진행중 in Persistence Nov 7, 2019
@SuhwanJang
Copy link
Contributor

SuhwanJang commented Nov 11, 2019

@jhpark816 @MinWooJin
참고사항입니다.
Redis persistence 는 CONFIG SET * 명령어를 통해 동적으로 persistence on/off 가 가능합니다.
persistence on/off 뿐만 아니라, rewrite 재수행 조건 (arcus 의 경우 체크포인트 수행 조건) , 명령 로깅 모드 설정, 스냅샷 파일 이름 설정도 동적으로 가능합니다.
CONFIG SET appendonly no // 명령 로깅 끄기.
CONFIG SET aof-rewrite-min-size 70mb // rewrite 재수행 조건 변경
CONFIG SET dbfilename newname.rdb // 스냅샷 파일 이름 변경
CONFIG SET appendfsync always // 명령 로깅을 동기모드로 변경

이유는 모르겠지만, 명령 로깅 파일의 이름은 동적으로 변경이 불가능합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Persistence
  
진행중
Development

No branches or pull requests

2 participants