congqixia
62bd51ec6d
fix: [2.4] Compare config value then swap when caching param value ( #33785 ) ( #33797 )
...
Cherry-pick from master
pr: #33785
See also #33784
This PR change the behavior of `SetCacheValue` of config manager:
- Use mutex and map instead of concurrent map for `configCache`
- Compare config raw value before set cache value
With this implementation, concurrent caching & eviction shall always
have current output:
|time|caching |eviction|config |cached |
|----|--------|------- |---------|---------|
|t0 |get | |old value|null |
|t1 |CAS OK | |old value|old value|
|t2 | |update |new value|old value|
|t3 | |eviction|new value|null |
|time|caching |eviction|config |cached |
|----|--------|------- |---------|---------|
|t0 |get | |old value|null |
|t1 | |update |new value|null |
|t2 |CAS fail| |old value|null |
|t3 | |eviction|new value|null |
|time|caching |eviction|config |cached |
|----|--------|------- |---------|---------|
|t0 | |update |new value|null |
|t1 |get | |new value|null |
|t2 |CAS OK | |new value|new value|
|t3 | |eviction|new value|null |
|time|caching |eviction|config |cached |
|----|--------|------- |---------|---------|
|t0 | |update |new value|null |
|t1 |get | |new value|null |
|t2 | |eviction|new value|null |
|t3 |CAS OK | |new value|new value|
|time|caching |eviction|config |cached |
|----|--------|------- |---------|---------|
|t0 | |update |new value|null |
|t1 | |eviction|new value|null |
|t2 |get | |new value|null |
|t3 |CAS OK | |new value|new value|
---------
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-06-13 17:51:57 +08:00
aoiasd
aaf6c85095
fix: paramtable cache cause dynamic config non-dynamic ( #33473 ) ( #33590 )
...
relate: https://github.com/milvus-io/milvus/issues/33461
pr: https://github.com/milvus-io/milvus/pull/33473
Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2024-06-05 10:15:51 +08:00
aoiasd
8385157717
enhance: adjust config source for support config event use paramtable ( #29995 )
...
Adjust config source for support config event which for dynamic config
could use paramtable and not deadlock.
relate: https://github.com/milvus-io/milvus/issues/29807
Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2024-01-26 19:07:00 +08:00
congqixia
d73b534f1e
fix: use atomic.Pointer to store EventHandler in case of data race ( #30205 )
...
Resolves #30204
---------
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-01-23 19:09:04 +08:00
yah01
c3f5856fbc
Fix data race for config with FileSource ( #26518 )
...
Signed-off-by: yah01 <yah2er0ne@outlook.com>
2023-08-24 09:18:24 +08:00
Enwei Jiao
086f3bd748
Add it for refresh config ( #23773 )
...
Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
2023-05-06 17:34:39 +08:00
jaime
c9d0c157ec
Move some modules from internal to public package ( #22572 )
...
Signed-off-by: jaime <yun.zhang@zilliz.com>
2023-04-06 19:14:32 +08:00