Skip to content

Conversation

@oliviarla
Copy link
Collaborator

πŸ”— Related Issue

  • Pipeline APIλ₯Ό μΆ”κ°€ν•©λ‹ˆλ‹€.
  • μ‚¬μš© 방법
    • Pipeline 객체λ₯Ό μƒμ„±ν•˜μ—¬ ν•˜λ‚˜μ˜ νŒŒμ΄ν”„λΌμΈμœΌλ‘œ 포함할 λͺ…령듀을 μ‘°ν•©ν•œλ‹€.
    • νŒŒμ΄ν”„λΌμΈμ— 포함할 수 μžˆλŠ” λͺ…령듀을 μ œν•œν•  수 μžˆλ‹€. (λͺ…λ Ήμ–΄μ˜ μ’…λ₯˜, 개수)
    • λͺ…λ Ήμ–΄μ˜ κ°œμˆ˜λŠ” μ΅œλŒ€ 500개둜 μ œν•œν•œλ‹€. 이λ₯Ό 톡해 ν•œ λ…Έλ“œμ—λŠ” μ΅œλŒ€ ν•˜λ‚˜μ˜ νŒŒμ΄ν”„λΌμΈμ΄ 보내진닀.
    • AsyncArcusCommands 객체 μ „μ—­μ μœΌλ‘œ flush μ—¬λΆ€λ₯Ό μ„€μ •ν•˜μ§€ μ•ŠμœΌλ―€λ‘œ μ„Έλ°€ν•˜κ²Œ νŒŒμ΄ν”„λΌμΈμ— 포함할 λͺ…령을 μ§€μ •ν•  수 μžˆλ‹€.
    public class Pipeline<V> {
    
        // λ‹€μ–‘ν•œ λͺ…령을 포함할 수 μžˆλŠ” PipelineOperationImpl νƒ€μž…μ„ value에 μ €μž₯ν•œλ‹€.
        private Map<MemcachedNode, Operation> ops;
        
        public Pipeline() {
          // ...
        }
        
        public Pipeline<V> lopInsert(String key, int index, V value) {
          // ...
          return this;
        }
        
        public Pipeline<V> mopInsert(String key, String mkey, V value) {
          // ...
          return this;
        }
        
        // ...
        
    }
    • λͺ…λ Ήμ˜ μ‘°ν•© μˆœμ„œλŒ€λ‘œ νŒŒμ΄ν”„λΌμΈμ΄ λ§Œλ“€μ–΄μ§€μ§€λ§Œ, μ„œλ²„μ—μ„œ 처리 도쀑 λ‹€λ₯Έ 연산이 끼어듀 수 μžˆλ‹€.
    • μ„œλ‘œ λ‹€λ₯Έ μ—¬λŸ¬ ν‚€λ₯Ό νŒŒμ΄ν”„λΌμΈμ— ν¬ν•¨ν•˜λŠ” 경우, 각 λ…Έλ“œ λ³„λ‘œ νŒŒμ΄ν”„λΌμΈμ΄ μƒμ„±λ˜μ–΄ λ…Έλ“œμ— μ „λ‹¬λœλ‹€.
    • Pipeline 객체λ₯Ό execute λ©”μ„œλ“œμ— λ„˜κ²¨μ•Ό νŒŒμ΄ν”„λΌμΈμ΄ μˆ˜ν–‰λ˜λ©°, List<Object> 에 각 λͺ…령에 λŒ€ν•œ 응닡이 λ‹΄κΈ΄λ‹€.
    ArcusFuture<List<Object>> execute(Pipeline<T> pipeline)

⌨️ What I did

  • μ˜ˆμ™Έ 처리
    • λͺ¨λ“  응닡이 올 λ•Œ κΉŒμ§€ κΈ°λ‹€λ¦° ν›„ μ—¬λŸ¬ μš”μ²­μ—μ„œ λ°œμƒν•œ μ‹€νŒ¨/μ—λŸ¬λ“€μ„ ν•˜λ‚˜μ˜ CompositeException νƒ€μž…μœΌλ‘œ λͺ¨μ•„ λ˜μ§„λ‹€.
  • switchover 처리
    • responseIndexλ₯Ό μ‚¬μš©ν•˜μ—¬ 아직 응닡이 μ˜€μ§€ μ•Šμ€ operationλ“€λ§Œ μƒˆλ‘œμš΄ master λ…Έλ“œμ—μ„œ initializeν•  λ•Œ ν¬ν•¨λ˜λ„λ‘ ν•œλ‹€.
  • migration 처리
    • gotStatus λ©”μ„œλ“œμ˜ 인자둜 Operation을 λ°›μ•„, μ—¬λŸ¬ Operation으둜 λΆ„λ¦¬λ˜λ”λΌλ„ 원본 μ½œλ°±μ—μ„œ 원본 index에 값을 μΆ”κ°€ν•  수 μžˆλ„λ‘ ν•œλ‹€.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant