naver / arcus-memcached

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

INTERNAL: Move a default_topkeys variable #783

Closed ing-eoking closed 1 month ago

ing-eoking commented 1 month ago

πŸ”— Related Issue

⌨️ What I did

jhpark816 commented 1 month ago

zookeeper μ‚¬μš©ν•˜λŠ” μ‘μš©μ€ μ•„λž˜μ™€ 같이 ν˜ΈμΆœν•˜μ—¬ zk handle을 λ¦¬ν„΄λ°›μŠ΅λ‹ˆλ‹€. 그리고, zk handle을 가지고 zookeeper 연산을 ν˜ΈμΆœν•©λ‹ˆλ‹€.

    zinfo->zh = zookeeper_init(zinfo->ensemble_list, arcus_zk_watcher,
                               arcus_conf.zk_timeout, &zinfo->myid, zinfo, 0);

default_topkeys도 λ§ˆμ°¬κ°€μ§€λ‘œ topkeys κΈ°λŠ₯ μ‚¬μš©μ— λŒ€ν•œ handle 같은 κ°œλ…μž…λ‹ˆλ‹€. λ”°λΌμ„œ, μ΄λŠ” topkeys κΈ°λŠ₯을 μ‚¬μš©ν•˜λŠ” μ‘μš©μΈ memcached.c νŒŒμΌμ— μžˆλŠ” 것이 μ •μƒμž…λ‹ˆλ‹€.

    if (settings.topkeys > 0) {
        default_topkeys = topkeys_init(settings.topkeys);
    }
ing-eoking commented 1 month ago

@jhpark816

ν˜„μž¬λŠ” default_topkeys만 μ‚¬μš© 쀑인데, κ·ΈλŸΌμ—λ„ topkeys_init ν•¨μˆ˜κ°€ μ—¬λŸ¬ topkeys handlerλ₯Ό λ°˜ν™˜ν•˜λ„λ‘ κ΅¬ν˜„λœ 것은, λ‹€μ–‘ν•œ ν•Έλ“€λŸ¬λ₯Ό μ‚¬μš©ν•  수 μžˆλŠ” 상황을 κ³ λ €ν•œ κ²ƒμΈκ°€μš”?

jhpark816 commented 1 month ago

topkeys κΈ°λŠ₯이 λ‹€μ–‘ν•œ ν•Έλ“€(handle)을 κ°€μ§ˆ 수 μžˆλ„λ‘ κ΅¬ν˜„λœ 것인지λ₯Ό ν™•μΈν•˜μ§€ μ•Šμ€ μƒνƒœμ΄λ―€λ‘œ, ν•œλ²ˆ 봐 μ£Όμ„Έμš”. μ—¬νŠΌ, topkeys κΈ°λŠ₯의 ν˜„μž¬ μ‚¬μš©λ²•μœΌλ‘œ 보면, 핸듀을 μ‘μš©μ—μ„œ 가지고 μžˆλŠ” 것이 λ§žλ‹€λΌλŠ” κ²ƒμž…λ‹ˆλ‹€.

ing-eoking commented 1 month ago

μ—¬νŠΌ, topkeys κΈ°λŠ₯의 ν˜„μž¬ μ‚¬μš©λ²•μœΌλ‘œ 보면, 핸듀을 μ‘μš©μ—μ„œ 가지고 μžˆλŠ” 것이 λ§žλ‹€λΌλŠ” κ²ƒμž…λ‹ˆλ‹€.

κΈ°μ‘΄ 둜직이 λ§žλŠ” λ°©ν–₯μ΄λ―€λ‘œ ν˜„μž¬ PR은 λ‹«κ² μŠ΅λ‹ˆλ‹€.