feat: remove async warmup policy (#42123)

issue: https://github.com/milvus-io/milvus/issues/41993

Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
This commit is contained in:
Buqian Zheng 2025-05-28 10:30:28 +08:00 committed by GitHub
parent 63246c040f
commit 7243c1d0ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 5 additions and 24 deletions

View File

@ -437,10 +437,9 @@ queryNode:
multipleChunkedEnable: true # Deprecated. Enable multiple chunked search
tieredStorage:
warmup:
# options: sync, async, disable.
# options: sync, disable.
# Specifies the timing for warming up the Tiered Storage cache.
# - "sync": data will be loaded into the cache before a segment is considered loaded.
# - "async": data will be loaded asynchronously into the cache after a segment is loaded.
# - "disable": data will not be proactively loaded into the cache, and loaded only if needed by search/query tasks.
# Defaults to "sync", except for vector field which defaults to "disable".
scalarField: sync
@ -459,7 +458,7 @@ queryNode:
diskHighWatermarkRatio: 0.8
diskMaxRatio: 0.9
# Enable eviction for Tiered Storage. Defaults to false.
# Note that if eviction is enabled, cache data loaded during sync/async warmup is also subject to eviction.
# Note that if eviction is enabled, cache data loaded during sync warmup is also subject to eviction.
evictionEnabled: false
knowhereScoreConsistency: false # Enable knowhere strong consistency score computation logic
jsonKeyStatsCommitInterval: 200 # the commit interval for the JSON key Stats to commit

View File

@ -86,21 +86,7 @@ class CacheSlot final : public std::enable_shared_from_this<CacheSlot<CellT>> {
for (cid_t i = 0; i < translator_->num_cells(); ++i) {
cids.push_back(i);
}
switch (warmup_policy) {
case CacheWarmupPolicy::CacheWarmupPolicy_Sync:
SemiInlineGet(PinCells(std::move(cids)));
break;
case CacheWarmupPolicy::CacheWarmupPolicy_Async:
// PinCells submits tasks to middle priority thread pool, thus here we submit to
// low priority thread pool to avoid dead lock.
auto& pool = milvus::ThreadPools::GetThreadPool(
milvus::ThreadPoolPriority::LOW);
pool.Submit([this, cids = std::move(cids)]() mutable {
SemiInlineGet(PinCells(std::move(cids)));
});
break;
}
SemiInlineGet(PinCells(std::move(cids)));
}
folly::SemiFuture<std::shared_ptr<CellAccessor<CellT>>>

View File

@ -35,7 +35,6 @@ typedef enum SegmentType SegmentType;
enum CacheWarmupPolicy {
CacheWarmupPolicy_Disable = 0,
CacheWarmupPolicy_Sync = 1,
CacheWarmupPolicy_Async = 2,
};
typedef enum CacheWarmupPolicy CacheWarmupPolicy;

View File

@ -300,8 +300,6 @@ func ConvertCacheWarmupPolicy(policy string) (C.CacheWarmupPolicy, error) {
switch policy {
case "sync":
return C.CacheWarmupPolicy_Sync, nil
case "async":
return C.CacheWarmupPolicy_Async, nil
case "disable":
return C.CacheWarmupPolicy_Disable, nil
default:

View File

@ -2928,10 +2928,9 @@ func (p *queryNodeConfig) init(base *BaseTable) {
Key: "queryNode.segcore.tieredStorage.warmup.scalarField",
Version: "2.6.0",
DefaultValue: "sync",
Doc: `options: sync, async, disable.
Doc: `options: sync, disable.
Specifies the timing for warming up the Tiered Storage cache.
- "sync": data will be loaded into the cache before a segment is considered loaded.
- "async": data will be loaded asynchronously into the cache after a segment is loaded.
- "disable": data will not be proactively loaded into the cache, and loaded only if needed by search/query tasks.
Defaults to "sync", except for vector field which defaults to "disable".`,
Export: true,
@ -2968,7 +2967,7 @@ Defaults to "sync", except for vector field which defaults to "disable".`,
Version: "2.6.0",
DefaultValue: "false",
Doc: `Enable eviction for Tiered Storage. Defaults to false.
Note that if eviction is enabled, cache data loaded during sync/async warmup is also subject to eviction.`,
Note that if eviction is enabled, cache data loaded during sync warmup is also subject to eviction.`,
Export: true,
}
p.TieredEvictionEnabled.Init(base.mgr)