Skip to content

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
Signed-off-by: JaySon-Huang <[email protected]>
  • Loading branch information
JaySon-Huang committed Jan 7, 2025
1 parent e019cfa commit 236d14f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
1 change: 1 addition & 0 deletions dbms/src/Interpreters/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ struct Settings
M(SettingUInt64, disagg_build_task_timeout, DEFAULT_DISAGG_TASK_BUILD_TIMEOUT_SEC, "disagg task establish timeout, unit is second.") \
M(SettingUInt64, disagg_task_snapshot_timeout, DEFAULT_DISAGG_TASK_TIMEOUT_SEC, "disagg task snapshot max endurable time, unit is second.") \
M(SettingUInt64, disagg_fetch_pages_timeout, DEFAULT_DISAGG_FETCH_PAGES_TIMEOUT_SEC, "fetch disagg pages timeout for one segment, unit is second.") \
M(SettingString, disagg_blocklist_wn_store_id, "", "comma seperated unsigned integers representing `store_id`s of stores that are blacklisted.") \
/* Disagg arch FastAddPeer settings */ \
M(SettingInt64, fap_wait_checkpoint_timeout_seconds, 80, "The max time wait for a usable checkpoint for FAP") \
M(SettingUInt64, fap_task_timeout_seconds, 120, "The max time FAP can take before fallback") \
Expand Down
8 changes: 3 additions & 5 deletions dbms/src/Server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -970,14 +970,12 @@ void loadBlockList(
Context & global_context,
[[maybe_unused]] const LoggerPtr & log)
{
#if SERVERLESS_PROXY == 1
global_context.initializeStoreIdBlockList(global_context.getSettingsRef().disagg_blocklist_wn_store_id);
#else
#if SERVERLESS_PROXY != 1
// We do not support blocking store by id in OP mode currently.
global_context.initializeStoreIdBlockList("");
#endif
#else
global_context.initializeStoreIdBlockList(global_context.getSettingsRef().disagg_blocklist_wn_store_id);

#if SERVERLESS_PROXY == 1
/// Load keyspace blacklist json file
LOG_INFO(log, "Loading blacklist file.");
auto blacklist_file_path = config.getString("blacklist_file", "");
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Storages/KVStore/MultiRaft/PrehandleSnapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ size_t KVStore::getMaxParallelPrehandleSize() const
auto max_subtask_size = getMaxPrehandleSubtaskSize();
// In serverless mode, IO takes more part in decoding stage, so we can increase parallel limit.
// In real test, the prehandling speed decreases if we use higher concurrency.
return std::min(4, total_concurrency);
return std::min(4, max_subtask_size);
#endif
}

Expand Down
14 changes: 7 additions & 7 deletions dbms/src/Storages/KVStore/Read/LockException.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ class LockException : public Exception
: Exception("Key is locked", ErrorCodes::REGION_LOCKED)
, locks(std::move(locks_))
{
#if SERVERLESS_PROXY != 0
std::set<RegionID> locked_regions;
#if SERVERLESS_PROXY == 0
for (const auto & lock : locks)
locked_regions.insert(lock.first);

this->message(fmt::format("Key is locked ({} locks in regions {})", locks.size(), locked_regions));
#else
std::set<std::string> keys;
std::set<std::string> primary_keys;
for (const auto & lock : locks)
Expand All @@ -51,12 +57,6 @@ class LockException : public Exception
locked_regions,
keys,
primary_keys));
#else
std::set<RegionID> locked_regions;
for (const auto & lock : locks)
locked_regions.insert(lock.first);

this->message(fmt::format("Key is locked ({} locks in regions {})", locks.size(), locked_regions));
#endif
}

Expand Down

0 comments on commit 236d14f

Please sign in to comment.