Skip to content

Commit

Permalink
fix invalid eds config case
Browse files Browse the repository at this point in the history
  • Loading branch information
swalrus1 committed Jan 23, 2025
1 parent 9fe3e88 commit 66b075a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions ydb/core/tx/tiering/fetcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class TEvSchemeObjectResolutionFailed: public TEventLocal<TEvSchemeObjectResolut
class TSchemeObjectWatcher: public TActorBootstrapped<TSchemeObjectWatcher> {
private:
TActorId Owner;
THashSet<TPathId> WatchedPathIds;

private:
THolder<NSchemeCache::TSchemeCacheNavigate> BuildSchemeCacheNavigateRequest(
Expand Down Expand Up @@ -103,11 +102,7 @@ class TSchemeObjectWatcher: public TActorBootstrapped<TSchemeObjectWatcher> {
}

void WatchPathId(const TPathId& pathId) {
if (WatchedPathIds.emplace(pathId).second) {
Send(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvWatchPathId(pathId), IEventHandle::FlagTrackDelivery);
} else {
AFL_DEBUG(NKikimrServices::TX_TIERING)("event", "skip_watch_path_id")("reason", "already_subscribed")("path", pathId.ToString());
}
Send(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvWatchPathId(pathId), IEventHandle::FlagTrackDelivery);
}

void Handle(TEvTxProxySchemeCache::TEvNavigateKeySetResult::TPtr& ev) {
Expand Down Expand Up @@ -152,7 +147,6 @@ class TSchemeObjectWatcher: public TActorBootstrapped<TSchemeObjectWatcher> {
const TString name = TString(ExtractBase(record->Path));
const TString storageDir = TString(ExtractParent(record->Path));
AFL_DEBUG(NKikimrServices::TX_TIERING)("event", "object_deleted")("path", record->Path);
AFL_VERIFY(WatchedPathIds.erase(record->PathId));
Send(Owner, new NTiers::TEvNotifySchemeObjectDeleted(record->Path));
}

Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tx/tiering/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class TTiersManager::TActor: public TActorBootstrapped<TTiersManager::TActor> {
}
Owner->UpdateTierConfig(tier, tierId);
} else {
AFL_WARN(false)("error", "invalid_object_type")("type", static_cast<ui64>(description.GetSelf().GetPathType()))("path", tierId.GetConfigPath());
AFL_WARN(NKikimrServices::TX_TIERING)("error", "invalid_object_type")("type", static_cast<ui64>(description.GetSelf().GetPathType()))("path", tierId.GetConfigPath());
Owner->UpdateTierConfig(std::nullopt, tierId);
}
}
Expand Down

0 comments on commit 66b075a

Please sign in to comment.