-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#7126] Fix YbAdminSnapshotScheduleTest.UndeleteIndex
Summary: Fixes issues uncovered by YbAdminSnapshotScheduleTest.UndeleteIndex test. 1) DeleteTableInMemory could be called multiple times in the case of the index table. There is a check that just does noop when the table was already deleted. Adjusted this check to do the same when the table is being hidden. 2) Don't remove the table from names map during delete, when it was previously hidden. Otherwise, it would crash with fatal during cleanup. 3) DeleteTabletListAndSendRequests executes delete on tablet before commiting tablet info changes. As a result tablet could be deleted before and callback called, before info changes in memory. So table would hang in delete state. Because callback would think that tablet is not being deleted. 4) Decreased log flooding when compactions are being enabled in RocksDB. When compactions are being enabled we call SetOptions twice for each RocksDB, and each of them dumps all current options values. So while we have regular and intents DB we have 4 dumps of all rocksdb options. Also added debug logging to `RWCLock::WriteLock()`, when it takes a too long time to acquire this lock, it would log the stack trace of the successful write lock. Test Plan: ybd --gtest_filter YbAdminSnapshotScheduleTest.UndeleteIndex -n 20 Reviewers: bogdan Reviewed By: bogdan Subscribers: amitanand, ybase Differential Revision: https://phabricator.dev.yugabyte.com/D11614
- Loading branch information
Showing
33 changed files
with
432 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright (c) YugaByte, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
// in compliance with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software distributed under the License | ||
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
// or implied. See the License for the specific language governing permissions and limitations | ||
// under the License. | ||
// | ||
|
||
#ifndef YB_COMMON_ENTITY_IDS_TYPES_H | ||
#define YB_COMMON_ENTITY_IDS_TYPES_H | ||
|
||
#include <string> | ||
|
||
#include "yb/util/strongly_typed_string.h" | ||
|
||
namespace yb { | ||
|
||
// TODO: switch many of these to opaque types for additional type safety and efficiency. | ||
using NamespaceName = std::string; | ||
using TableName = std::string; | ||
using UDTypeName = std::string; | ||
using RoleName = std::string; | ||
|
||
using NamespaceId = std::string; | ||
using TableId = std::string; | ||
using UDTypeId = std::string; | ||
using CDCStreamId = std::string; | ||
|
||
using PeerId = std::string; | ||
using SnapshotId = std::string; | ||
using TabletServerId = PeerId; | ||
using TabletId = std::string; | ||
using TablegroupId = std::string; | ||
using TablespaceId = std::string; | ||
|
||
YB_STRONGLY_TYPED_STRING(KvStoreId); | ||
|
||
// TODO(#79): switch to YB_STRONGLY_TYPED_STRING | ||
using RaftGroupId = std::string; | ||
|
||
using NamespaceIdTableNamePair = std::pair<NamespaceId, TableName>; | ||
|
||
using FlushRequestId = std::string; | ||
|
||
using RedisConfigKey = std::string; | ||
|
||
} // namespace yb | ||
|
||
#endif // YB_COMMON_ENTITY_IDS_TYPES_H |
Oops, something went wrong.