diff options
author | xenoxeno <xeno@ydb.tech> | 2022-08-26 12:01:35 +0300 |
---|---|---|
committer | xenoxeno <xeno@ydb.tech> | 2022-08-26 12:01:35 +0300 |
commit | fb1284aa4f72410ed27d941c708021886b32ab92 (patch) | |
tree | a045b1e8caf4eae8fca9972c53b7240967e51f0f | |
parent | a9736534c949447c5d1a9cf9c7d65b9d1fe04279 (diff) | |
download | ydb-fb1284aa4f72410ed27d941c708021886b32ab92.tar.gz |
increase size of requested sequence when possible
-rw-r--r-- | library/cpp/cgiparam/cgiparam_ut.cpp | 4 | ||||
-rw-r--r-- | ydb/core/mind/hive/hive_impl.cpp | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/library/cpp/cgiparam/cgiparam_ut.cpp b/library/cpp/cgiparam/cgiparam_ut.cpp index a5623420840..de6d23882dc 100644 --- a/library/cpp/cgiparam/cgiparam_ut.cpp +++ b/library/cpp/cgiparam/cgiparam_ut.cpp @@ -51,9 +51,9 @@ Y_UNIT_TEST_SUITE(TCgiParametersTest) { TCgiParameters c; c.Scan(parsee); - c.InsertUnescaped("d", "xxx"); + c.InsertUnescaped("d", "x=x"); - UNIT_ASSERT_VALUES_EQUAL(c.Print(), parsee + "&d=xxx"); + UNIT_ASSERT_VALUES_EQUAL(c.Print(), parsee + "&d=x\%3Dx"); } Y_UNIT_TEST(TestScanAddAll1) { diff --git a/ydb/core/mind/hive/hive_impl.cpp b/ydb/core/mind/hive/hive_impl.cpp index d2fc1cddd3b..2c4fdbfe3bb 100644 --- a/ydb/core/mind/hive/hive_impl.cpp +++ b/ydb/core/mind/hive/hive_impl.cpp @@ -2462,12 +2462,18 @@ void THive::RequestFreeSequence() { size_t sequenceIndex = Sequencer.NextFreeSequenceIndex(); size_t sequenceSize = GetRequestSequenceSize(); + if (PendingCreateTablets.size() > sequenceSize) { + size_t newSequenceSize = ((PendingCreateTablets.size() / sequenceSize) + 1) * sequenceSize; + BLOG_W("Increasing sequence size from " << sequenceSize << " to " << newSequenceSize << " due to PendingCreateTablets.size() == " << PendingCreateTablets.size()); + sequenceSize = newSequenceSize; + } + BLOG_D("Requesting free sequence #" << sequenceIndex << " of " << sequenceSize << " from root hive"); SendToRootHivePipe(new TEvHive::TEvRequestTabletIdSequence(TabletID(), sequenceIndex, sequenceSize)); RequestingSequenceNow = true; RequestingSequenceIndex = sequenceIndex; } else { - BLOG_ERROR("We run out of tablet ids"); + BLOG_ERROR("We ran out of tablet ids"); } } |