refine code

This commit is contained in:
chaoguang 2020-04-07 10:25:26 -07:00
parent 640a29252b
commit ff92336887
2 changed files with 3 additions and 3 deletions

View File

@ -276,7 +276,7 @@ public:
Key getKeyForIndex(int idx) { return Key(prefix + format("%010d", idx)).withPrefix(range.begin); }
int getSize() { return size; }
virtual Future<Standalone<RangeResultRef>> getRange(Reference<ReadYourWritesTransaction> ryw,
Future<Standalone<RangeResultRef>> getRange(Reference<ReadYourWritesTransaction> ryw,
KeyRangeRef kr) const override {
int startIndex = 0, endIndex = size;
while (startIndex < size && kvs[startIndex].key < kr.begin) ++startIndex;

View File

@ -32,7 +32,7 @@ protected:
class SpecialKeySpace {
public:
// withPrefix is true if the passing keys are prefixed with \xff\xff (cases from RYW),
// withPrefix is true if the passing keys are prefixed with \xff\xff (cases from RYW),
// otherwise, false(cases from tests)
Future<Optional<Value>> get(Reference<ReadYourWritesTransaction> ryw, const Key& key, bool withPrefix = true);
@ -74,7 +74,7 @@ private:
class ConflictingKeysImpl : public SpecialKeyRangeBaseImpl {
public:
explicit ConflictingKeysImpl(KeyRef start, KeyRef end);
virtual Future<Standalone<RangeResultRef>> getRange(Reference<ReadYourWritesTransaction> ryw, KeyRangeRef kr) const;
Future<Standalone<RangeResultRef>> getRange(Reference<ReadYourWritesTransaction> ryw, KeyRangeRef kr) const override;
};
#include "flow/unactorcompiler.h"