diff options
author | mokhotskii <mokhotskii@yandex-team.ru> | 2022-02-21 18:00:50 +0300 |
---|---|---|
committer | mokhotskii <mokhotskii@yandex-team.ru> | 2022-02-21 18:00:50 +0300 |
commit | b2396160c6cb4b1c3dfe77c23eaeb08d90086b11 (patch) | |
tree | 99ded8d7277cc16f4e03e92784ea1c8b8beddc87 | |
parent | ff50dac3b040da3446c0b3a77818e7379fdb6d43 (diff) | |
download | ydb-b2396160c6cb4b1c3dfe77c23eaeb08d90086b11.tar.gz |
LOGBROKER-7309 Fix various minor issues
1. Add modificator TRANSFORM_EMPTY_TO_NOTHING for DescribeStream::...::EndingSequenceNumber + test
2. Fix issue with transformation of double timestamps. 10e3 == 10'000, not 1000 + improved test
ref:24bbca6652434c835e894c1b637ac818f0a358ec
-rw-r--r-- | ydb/core/persqueue/pq_impl.cpp | 8 | ||||
-rw-r--r-- | ydb/public/api/protos/draft/datastreams.proto | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/ydb/core/persqueue/pq_impl.cpp b/ydb/core/persqueue/pq_impl.cpp index 9937dbe561c..4ffbcf49c1f 100644 --- a/ydb/core/persqueue/pq_impl.cpp +++ b/ydb/core/persqueue/pq_impl.cpp @@ -2040,8 +2040,8 @@ void TPersQueue::HandleWakeup(const TActorContext& ctx) { TString TPersQueue::GetMeteringJson( const TString& metricBillingId, const TString& schemeName, const THashMap<TString, ui64>& tags, - ui64 quantity, const TString& quantityUnit, - const TInstant& start, const TInstant& end, const TInstant& now + ui64 quantity, const TString& quantityUnit, const TInstant& start, const TInstant& end, + const TInstant& now ) { TStringStream output; NJson::TJsonWriter writer(&output, false); @@ -2121,12 +2121,14 @@ void TPersQueue::FlushMetrics(bool force, const TActorContext &ctx) { RequestsMetricsLastFlush = now; } if (needFlushShards) { + // TODO: storageLimit here bytes/sec ui64 writeQuota = Config.GetPartitionConfig().GetWriteSpeedInBytesPerSecond(); ui64 reservedSpace = Config.GetPartitionConfig().GetLifetimeSeconds() * writeQuota; ui64 consumersThroughput = Config.ReadRulesSize() * writeQuota; ui64 numPartitions = Config.PartitionsSize(); THashMap<TString, ui64> tags = { - {"reserved_throughput_bps", writeQuota}, {"shard_enhanced_consumers_throughput", consumersThroughput}, + {"reserved_throughput_bps", writeQuota}, + {"shard_enhanced_consumers_throughput", consumersThroughput}, {"reserved_storage_bytes", reservedSpace} }; auto makeShardsMetricsJson = [&](TInstant& end) { diff --git a/ydb/public/api/protos/draft/datastreams.proto b/ydb/public/api/protos/draft/datastreams.proto index 5c1354288af..4e80c1cbb8a 100644 --- a/ydb/public/api/protos/draft/datastreams.proto +++ b/ydb/public/api/protos/draft/datastreams.proto @@ -110,7 +110,7 @@ message StreamDescription { // Represents range of possible sequence numbers for the shard message SequenceNumberRange { string starting_sequence_number = 1; - string ending_sequence_number = 2; + string ending_sequence_number = 2 [(FieldTransformer) = TRANSFORM_EMPTY_TO_NOTHING]; } // Represents shard details |