Skip to content

Add seed nodes option to ydbd#1

Open
mregrock wants to merge 5 commits into
mainfrom
seed_nodes
Open

Add seed nodes option to ydbd#1
mregrock wants to merge 5 commits into
mainfrom
seed_nodes

Conversation

@mregrock

@mregrock mregrock commented Jun 5, 2025

Copy link
Copy Markdown
Owner

Changelog entry

Add seed nodes option to ydbd

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

...

@mregrock

mregrock commented Jun 5, 2025

Copy link
Copy Markdown
Owner Author

BugBot run

cursor[bot]

This comment was marked as outdated.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Infinite Retry Loop in Config Fetching

The FetchConfigImpl method in TDefaultConfigClient contains an infinite retry loop. The while (!result.IsSuccess()) loop lacks a timeout or maximum retry limit. This causes the application to hang indefinitely during initialization if the provided address list is empty (e.g., from an empty seed nodes file []) or if all addresses are unreachable or consistently fail.

ydb/core/config/init/init.cpp#L466-L489

static NYdb::NConfig::TFetchConfigResult FetchConfigImpl(
const TGrpcSslSettings& grpcSettings,
const TVector<TString>& addrs,
const IEnv& env,
IInitLogger& logger)
{
NYdb::NConfig::TFetchConfigResult result;
while (!result.IsSuccess()) {
for (const auto& addr : addrs) {
logger.Out() << "Trying to fetch config from " << addr << Endl;
result = TryToFetchConfig(grpcSettings, addr, env);
if (result.IsSuccess()) {
logger.Out() << "Success. Fetched config from " << addr << Endl;
break;
}
logger.Err() << "Fetch config error: " << static_cast<NYdb::TStatus>(result) << Endl;
}
if (!result.IsSuccess()) {
env.Sleep(TDuration::Seconds(1));
}
}
return result;
}

Fix in Cursor


BugBot free trial expires on June 9, 2025
You have used $0.00 of your $0.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

@mregrock
mregrock force-pushed the seed_nodes branch 2 times, most recently from 176a9fa to 04269eb Compare June 5, 2025 19:11
mregrock pushed a commit that referenced this pull request Jun 27, 2025
commit_hash:5b246144e81555f1bc12b2c8ca111e351dcd5ed7
mregrock pushed a commit that referenced this pull request Aug 1, 2025
mregrock pushed a commit that referenced this pull request Sep 29, 2025
```
WARNING: ThreadSanitizer: data race (pid=123179)
  Read of size 8 at 0x0000065aad98 by thread T14:
    #0 NSystemInfo::CachedNumberOfCpus() util/system/info.cpp:241:10 (taxi-uservices-userver-core-tests+0x4155bba)
    #1 engine::(anonymous namespace)::TaskProcessorThreadStartedHook() userver/core/src/engine/task/task_processor.cpp:100:15 (taxi-uservices-userver-core-tests+0x5306bc8)
    ydb-platform#2 engine::TaskProcessor::PrepareWorkerThread(unsigned long) userver/core/src/engine/task/task_processor.cpp:347:5 (taxi-uservices-userver-core-tests+0x5306bc8)
```

The change on a hot path is equivalent to the previously compiler generated x86 code (just a `load` instruction). On other platforms this could actually fix a data race.
commit_hash:acb1fe1b8f3075cc27b18aab4f1bd0b88292c270
mregrock pushed a commit that referenced this pull request Jan 12, 2026
commit_hash:7afedb08035fd3cd26143d1448bf94cc6dbc3f8c
mregrock pushed a commit that referenced this pull request Jan 19, 2026
mregrock pushed a commit that referenced this pull request Mar 30, 2026
mregrock pushed a commit that referenced this pull request Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant