diff options
author | alexnick <alexnick@yandex-team.ru> | 2022-02-24 01:42:00 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-24 01:42:00 +0300 |
commit | 746834cd281440768bd56db14dabd545fd123ca0 (patch) | |
tree | 1af66d0607b0cb1dadd424613ee7c005daab62bc | |
parent | ce558ec5cf887e0e74ea38ef4430cd81eca39a15 (diff) | |
download | ydb-746834cd281440768bd56db14dabd545fd123ca0.tar.gz |
merge from trunk: fix for tests KIKIMR-14230 MONSUPPORT-599
fix for test KIKIMR-14230
REVIEW: 2346698
remove sensor needed for investigation MONSUPPORT-599
REVIEW: 2346419
fix for test KIKIMR-14230
REVIEW: 2346559
fix for test KIKIMR-14230
REVIEW: 2346446
REVIEW: 2347036
x-ydb-stable-ref: 4a085ebebf727c92a2c6a8f2b6192758ac9cf8b5
-rw-r--r-- | ydb/core/persqueue/key.h | 6 | ||||
-rw-r--r-- | ydb/core/persqueue/partition.cpp | 4 | ||||
-rw-r--r-- | ydb/core/persqueue/pq_ut.h | 4 | ||||
-rw-r--r-- | ydb/core/protos/counters_pq.proto | 3 | ||||
-rw-r--r-- | ydb/services/datastreams/datastreams_ut.cpp | 7 | ||||
-rw-r--r-- | ydb/services/persqueue_v1/persqueue_ut.cpp | 7 |
6 files changed, 10 insertions, 21 deletions
diff --git a/ydb/core/persqueue/key.h b/ydb/core/persqueue/key.h index 098c67cf7d..356c0cf6df 100644 --- a/ydb/core/persqueue/key.h +++ b/ydb/core/persqueue/key.h @@ -20,10 +20,10 @@ public: }; enum EMark : char { - MarkUserDeprecated = 'u', - MarkSourceId = 's', + MarkUser = 'c', MarkProtoSourceId = 'p', - MarkUser = 'c' + MarkSourceId = 's', + MarkUserDeprecated = 'u' }; TKeyPrefix(EType type, const ui32 partition) diff --git a/ydb/core/persqueue/partition.cpp b/ydb/core/persqueue/partition.cpp index 0df5db92d2..1e775741d4 100644 --- a/ydb/core/persqueue/partition.cpp +++ b/ydb/core/persqueue/partition.cpp @@ -3177,10 +3177,6 @@ void TPartition::ReportLabeledCounters(const TActorContext& ctx) haveChanges = true; userInfo.LabeledCounters.GetCounters()[METRIC_READ_OFFSET_REWIND_SUM].Set(readOffsetRewindSum); } - if (readOffsetRewindSum != userInfo.LabeledCounters.GetCounters()[METRIC_READ_OFFSET_REWIND_TOTAL].Get()) { - haveChanges = true; - userInfo.LabeledCounters.GetCounters()[METRIC_READ_OFFSET_REWIND_TOTAL].Set(readOffsetRewindSum); - } ui32 id = METRIC_TOTAL_READ_SPEED_1; for (ui32 i = 0; i < userInfo.AvgReadBytes.size(); ++i) { diff --git a/ydb/core/persqueue/pq_ut.h b/ydb/core/persqueue/pq_ut.h index cbba48c173..f5f961022c 100644 --- a/ydb/core/persqueue/pq_ut.h +++ b/ydb/core/persqueue/pq_ut.h @@ -961,9 +961,9 @@ TVector<TString> CmdSourceIdRead(TTestContext& tc) { NPQ::TKeyPrefix ikeyFrom(NPQ::TKeyPrefix::TypeInfo, 0, NPQ::TKeyPrefix::MarkSourceId); range->SetFrom(ikeyFrom.Data(), ikeyFrom.Size()); range->SetIncludeFrom(true); - NPQ::TKeyPrefix ikeyTo(NPQ::TKeyPrefix::TypeInfo, 1, NPQ::TKeyPrefix::MarkSourceId); + NPQ::TKeyPrefix ikeyTo(NPQ::TKeyPrefix::TypeInfo, 0, NPQ::TKeyPrefix::MarkUserDeprecated); range->SetTo(ikeyTo.Data(), ikeyTo.Size()); - range->SetIncludeTo(true); + range->SetIncludeTo(false); Cout << request.Get()->ToString() << Endl; tc.Runtime->SendToPipe(tc.TabletId, tc.Edge, request.Release(), 0, GetPipeConfigWithRetries()); result = tc.Runtime->GrabEdgeEvent<TEvKeyValue::TEvResponse>(handle); diff --git a/ydb/core/protos/counters_pq.proto b/ydb/core/protos/counters_pq.proto index 7233758135..5421c0561f 100644 --- a/ydb/core/protos/counters_pq.proto +++ b/ydb/core/protos/counters_pq.proto @@ -179,9 +179,6 @@ enum EClientLabeledCounters { METRIC_LAST_READ_TIME = 25 [(LabeledCounterOpts) = {Name: "TimeSinceLastReadMs" AggrFunc : EAF_MIN Type : CT_TIMELAG}]; METRIC_READ_QUOTA_USAGE = 26 [(LabeledCounterOpts) = {Name: "PartitionMaxReadQuotaUsage" AggrFunc : EAF_MAX}]; - - METRIC_READ_OFFSET_REWIND_TOTAL = 27 [(LabeledCounterOpts) = {Name: "ReadOffsetRewindTotal" AggrFunc : EAF_SUM}]; - } diff --git a/ydb/services/datastreams/datastreams_ut.cpp b/ydb/services/datastreams/datastreams_ut.cpp index 857edb30ab..d802fc014d 100644 --- a/ydb/services/datastreams/datastreams_ut.cpp +++ b/ydb/services/datastreams/datastreams_ut.cpp @@ -676,9 +676,6 @@ Y_UNIT_TEST_SUITE(DataStreams) { UNIT_ASSERT(result.IsSuccess()); UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::SUCCESS); - UNIT_ASSERT(result.IsSuccess()); - UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::SUCCESS); - kikimr->GetRuntime()->SetLogPriority(NKikimrServices::PQ_READ_PROXY, NLog::EPriority::PRI_INFO); kikimr->GetRuntime()->SetLogPriority(NKikimrServices::PERSQUEUE, NLog::EPriority::PRI_INFO); @@ -737,7 +734,7 @@ Y_UNIT_TEST_SUITE(DataStreams) { .RetryPolicy(NYdb::NPersQueue::IRetryPolicy::GetNoRetryPolicy()) .AppendTopics(NYdb::NPersQueue::TTopicReadSettings().Path(streamPath))); ui32 readCount = 0; - while (readCount < 14) { + while (readCount < 16) { auto event = session->GetEvent(true); if (auto* dataReceivedEvent = std::get_if<NYdb::NPersQueue::TReadSessionEvent::TDataReceivedEvent>(&*event)) { @@ -753,7 +750,7 @@ Y_UNIT_TEST_SUITE(DataStreams) { break; } } - UNIT_ASSERT_VALUES_EQUAL(readCount, 14); + UNIT_ASSERT_VALUES_EQUAL(readCount, 16); } Y_UNIT_TEST(TestPutRecords) { diff --git a/ydb/services/persqueue_v1/persqueue_ut.cpp b/ydb/services/persqueue_v1/persqueue_ut.cpp index 6e5c662a7a..2c955a1085 100644 --- a/ydb/services/persqueue_v1/persqueue_ut.cpp +++ b/ydb/services/persqueue_v1/persqueue_ut.cpp @@ -2269,7 +2269,7 @@ namespace { auto log = setup.GetLog(); setup.GetPQConfig().SetClustersUpdateTimeoutSec(0); setup.GetPQConfig().SetRemoteClusterEnabledDelaySec(0); - setup.GetPQConfig().SetCloseClientSessionWithEnabledRemotePreferredClusterDelaySec(0); + setup.GetPQConfig().SetCloseClientSessionWithEnabledRemotePreferredClusterDelaySec(3); const auto edgeActorID = setup.GetServer().GetRuntime()->AllocateEdgeActor(); @@ -2277,12 +2277,11 @@ namespace { log << TLOG_INFO << "Wait for cluster tracker event"; auto clustersUpdate = setup.GetServer().GetRuntime()->GrabEdgeEvent<NPQ::NClusterTracker::TEvClusterTracker::TEvClustersUpdate>(); - + TInstant now = TInstant::Now(); auto session = setup.InitWriteSession(GenerateSessionSetupWithPreferredCluster(setup.GetRemoteCluster())); - AssertStreamingSessionAlive(session.first); - AssertStreamingSessionDead(session.first, Ydb::StatusIds::ABORTED, Ydb::PersQueue::ErrorCode::PREFERRED_CLUSTER_MISMATCHED); + UNIT_ASSERT(TInstant::Now() - now > TDuration::Seconds(3)); } Y_UNIT_TEST(PreferredCluster_NonExistentPreferredCluster_SessionDiesOnlyAfterDelay) { |