address comments
This commit is contained in:
parent
999cf37ab0
commit
1766f412bb
|
@ -823,7 +823,7 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
|
|||
init( STORAGE_COMMIT_INTERVAL, 0.5 ); if( randomize && BUGGIFY ) STORAGE_COMMIT_INTERVAL = 2.0;
|
||||
init( BYTE_SAMPLING_FACTOR, 250 ); //cannot buggify because of differences in restarting tests
|
||||
init( BYTE_SAMPLING_OVERHEAD, 100 );
|
||||
init( MIN_BYTE_SAMPLING_PROBABILITY, 0 ); //Adjustable only for test of PhysicalShardMove. should be always zero for other cases
|
||||
init( MIN_BYTE_SAMPLING_PROBABILITY, 0 ); // Adjustable only for test of PhysicalShardMove. should be always zero for other cases
|
||||
init( MAX_STORAGE_SERVER_WATCH_BYTES, 100e6 ); if( randomize && BUGGIFY ) MAX_STORAGE_SERVER_WATCH_BYTES = 10e3;
|
||||
init( MAX_BYTE_SAMPLE_CLEAR_MAP_SIZE, 1e9 ); if( randomize && BUGGIFY ) MAX_BYTE_SAMPLE_CLEAR_MAP_SIZE = 1e3;
|
||||
init( LONG_BYTE_SAMPLE_RECOVERY_DELAY, 60.0 );
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include "fdbclient/FDBTypes.h"
|
||||
|
||||
const std::string checkpointBytesSampleFileName = "metadata_bytes.sst";
|
||||
|
||||
// FDB storage checkpoint format.
|
||||
enum CheckpointFormat {
|
||||
InvalidFormat = 0,
|
||||
|
|
|
@ -31,9 +31,6 @@
|
|||
|
||||
#include "flow/actorcompiler.h" // has to be last include
|
||||
|
||||
const std::string checkpointBytesSampleFileName = "metadata_bytes.sst";
|
||||
const std::string checkpointBytesSampleTempFolder = "/metadata_temp";
|
||||
|
||||
class IRocksDBSstFileWriter {
|
||||
public:
|
||||
virtual void open(const std::string localFile) = 0;
|
||||
|
|
|
@ -202,6 +202,7 @@ static const KeyRangeRef persistCheckpointKeys =
|
|||
static const KeyRangeRef persistPendingCheckpointKeys =
|
||||
KeyRangeRef(PERSIST_PREFIX "PendingCheckpoint/"_sr, PERSIST_PREFIX "PendingCheckpoint0"_sr);
|
||||
static const std::string rocksdbCheckpointDirPrefix = "/rockscheckpoints_";
|
||||
static const std::string checkpointBytesSampleTempFolder = "/metadata_temp";
|
||||
|
||||
struct AddingShard : NonCopyable {
|
||||
KeyRange keys;
|
||||
|
@ -9637,6 +9638,8 @@ ACTOR Future<bool> createSstFileForCheckpointShardBytesSample(StorageServer* dat
|
|||
|
||||
loop {
|
||||
try {
|
||||
// Any failure leads to retry until retryCount reaches maximum
|
||||
// For each retry, cleanup the bytesSampleFile created in last time
|
||||
ASSERT(directoryExists(parentDirectory(bytesSampleFile)));
|
||||
if (fileExists(abspath(bytesSampleFile))) {
|
||||
deleteFile(abspath(bytesSampleFile));
|
||||
|
@ -9649,14 +9652,14 @@ ACTOR Future<bool> createSstFileForCheckpointShardBytesSample(StorageServer* dat
|
|||
}
|
||||
ASSERT(metaData.ranges.size() > 0);
|
||||
std::sort(metaData.ranges.begin(), metaData.ranges.end(), [](KeyRange a, KeyRange b) {
|
||||
// Make sure no overlapping between compared two ranges
|
||||
if (a.begin < b.begin) {
|
||||
// Debug usage: make sure no overlapping between compared two ranges
|
||||
/* if (a.begin < b.begin) {
|
||||
ASSERT(a.end <= b.begin);
|
||||
} else if (a.begin > b.begin) {
|
||||
ASSERT(a.end >= b.begin);
|
||||
} else {
|
||||
ASSERT(false);
|
||||
}
|
||||
} */
|
||||
// metaData.ranges must be in ascending order
|
||||
// sstWriter requires written keys to be in ascending order
|
||||
return a.begin < b.begin;
|
||||
|
@ -9685,7 +9688,7 @@ ACTOR Future<bool> createSstFileForCheckpointShardBytesSample(StorageServer* dat
|
|||
readBegin = keyAfter(readResult.readThrough.get());
|
||||
ASSERT(readBegin <= readEnd);
|
||||
} else {
|
||||
break;
|
||||
break; // finish for current metaDataRangesIter
|
||||
}
|
||||
} catch (Error& e) {
|
||||
if (failureCount < SERVER_KNOBS->ROCKSDB_CREATE_BYTES_SAMPLE_FILE_RETRY_MAX) {
|
||||
|
|
Loading…
Reference in New Issue