commit
72756c7404
@ -2423,7 +2423,7 @@ Status DBImpl::DoCompactionWork(CompactionState* compact,
|
|||||||
|
|
||||||
int num_output_files = compact->outputs.size();
|
int num_output_files = compact->outputs.size();
|
||||||
if (compact->builder != nullptr) {
|
if (compact->builder != nullptr) {
|
||||||
// An error occured so ignore the last output.
|
// An error occurred so ignore the last output.
|
||||||
assert(num_output_files > 0);
|
assert(num_output_files > 0);
|
||||||
--num_output_files;
|
--num_output_files;
|
||||||
}
|
}
|
||||||
|
@ -407,7 +407,7 @@ when 1 write buffer is being flushed to storage, new writes can continue
|
|||||||
to the other write buffer.
|
to the other write buffer.
|
||||||
<code>Options::min_write_buffer_number_to_merge</code> is the minimum number
|
<code>Options::min_write_buffer_number_to_merge</code> is the minimum number
|
||||||
of write buffers that will be merged together before writing to storage.
|
of write buffers that will be merged together before writing to storage.
|
||||||
If set to 1, then all write buffers are fushed to L0 as individual files and
|
If set to 1, then all write buffers are flushed to L0 as individual files and
|
||||||
this increases read amplification because a get request has to check in all
|
this increases read amplification because a get request has to check in all
|
||||||
of these files. Also, an in-memory merge may result in writing lesser
|
of these files. Also, an in-memory merge may result in writing lesser
|
||||||
data to storage if there are duplicate records in each of these
|
data to storage if there are duplicate records in each of these
|
||||||
@ -661,7 +661,7 @@ that hold all the different options for that compaction. The exact definition is
|
|||||||
Here we give short overview of options in <code>CompactionOptionsUniversal</code>:
|
Here we give short overview of options in <code>CompactionOptionsUniversal</code>:
|
||||||
<ul>
|
<ul>
|
||||||
<p>
|
<p>
|
||||||
<li> <code>CompactionOptionsUniversal::size_ratio</code> - Percentage flexibilty while comparing file size. If the candidate file(s)
|
<li> <code>CompactionOptionsUniversal::size_ratio</code> - Percentage flexibility while comparing file size. If the candidate file(s)
|
||||||
size is 1% smaller than the next file's size, then include next file into
|
size is 1% smaller than the next file's size, then include next file into
|
||||||
this candidate set. Default: 1
|
this candidate set. Default: 1
|
||||||
<p>
|
<p>
|
||||||
|
@ -146,7 +146,7 @@ def main(argv):
|
|||||||
stdoutdata = stdoutdata.lower()
|
stdoutdata = stdoutdata.lower()
|
||||||
errorcount = (stdoutdata.count('error') -
|
errorcount = (stdoutdata.count('error') -
|
||||||
stdoutdata.count('got errors 0 times'))
|
stdoutdata.count('got errors 0 times'))
|
||||||
print "#times error occured in output is " + str(errorcount) + "\n"
|
print "#times error occurred in output is " + str(errorcount) + "\n"
|
||||||
|
|
||||||
if (errorcount > 0):
|
if (errorcount > 0):
|
||||||
print "TEST FAILED. Output has 'error'!!!\n"
|
print "TEST FAILED. Output has 'error'!!!\n"
|
||||||
|
@ -314,7 +314,7 @@ class LDBTestCase(unittest.TestCase):
|
|||||||
# Dump command fails because of typo in params
|
# Dump command fails because of typo in params
|
||||||
dumpFilePath = os.path.join(self.TMP_DIR, "dump8")
|
dumpFilePath = os.path.join(self.TMP_DIR, "dump8")
|
||||||
self.assertFalse(self.dumpDb(
|
self.assertFalse(self.dumpDb(
|
||||||
"--db=%s --create_if_missin" % origDbPath, dumpFilePath))
|
"--db=%s --create_if_missing" % origDbPath, dumpFilePath))
|
||||||
|
|
||||||
def testMiscAdminTask(self):
|
def testMiscAdminTask(self):
|
||||||
print "Running testMiscAdminTask..."
|
print "Running testMiscAdminTask..."
|
||||||
|
@ -7,11 +7,11 @@ class ShellContext;
|
|||||||
/*
|
/*
|
||||||
* Currently, there are four types of state in total
|
* Currently, there are four types of state in total
|
||||||
* 1. start state: the first state the program enters
|
* 1. start state: the first state the program enters
|
||||||
* 2. connecting state: the program try to connnect to a rocksdb server, whose
|
* 2. connecting state: the program try to connect to a rocksdb server, whose
|
||||||
* previous states could be "start" or "connected" states
|
* previous states could be "start" or "connected" states
|
||||||
* 3. connected states: the program has already connected to a server, and is
|
* 3. connected states: the program has already connected to a server, and is
|
||||||
* processing user commands
|
* processing user commands
|
||||||
* 4. stop state: the last state the program enters, do some cleanning up things
|
* 4. stop state: the last state the program enters, do some cleaning up things
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ShellState {
|
class ShellState {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// these variables tell us about the git config and time
|
// these variables tell us about the git config and time
|
||||||
extern const char* rocksdb_build_git_sha;
|
extern const char* rocksdb_build_git_sha;
|
||||||
|
|
||||||
// these variables tell us when the compilation occured
|
// these variables tell us when the compilation occurred
|
||||||
extern const char* rocksdb_build_compile_time;
|
extern const char* rocksdb_build_compile_time;
|
||||||
extern const char* rocksdb_build_compile_date;
|
extern const char* rocksdb_build_compile_date;
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ class StringLists {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Either key does not exist, or there is some error.
|
// Either key does not exist, or there is some error.
|
||||||
*result = ""; // Always return empty string (just for convenvtion)
|
*result = ""; // Always return empty string (just for convention)
|
||||||
|
|
||||||
//NotFound is okay; just return empty (similar to std::map)
|
//NotFound is okay; just return empty (similar to std::map)
|
||||||
//But network or db errors, etc, should fail the test (or at least yell)
|
//But network or db errors, etc, should fail the test (or at least yell)
|
||||||
|
@ -10,7 +10,7 @@ using namespace rocksdb;
|
|||||||
namespace { // anonymous namespace
|
namespace { // anonymous namespace
|
||||||
|
|
||||||
// A 'model' merge operator with uint64 addition semantics
|
// A 'model' merge operator with uint64 addition semantics
|
||||||
// Implemented as an AssociativeMergeOperator for simplicty and example.
|
// Implemented as an AssociativeMergeOperator for simplicity and example.
|
||||||
class UInt64AddOperator : public AssociativeMergeOperator {
|
class UInt64AddOperator : public AssociativeMergeOperator {
|
||||||
public:
|
public:
|
||||||
virtual bool Merge(const Slice& key,
|
virtual bool Merge(const Slice& key,
|
||||||
|
@ -485,7 +485,7 @@ TEST(RedisListsTest, InsertPushSetTest) {
|
|||||||
// redis.Print("k1"); // manually check
|
// redis.Print("k1"); // manually check
|
||||||
|
|
||||||
// Test Inserting before/after non-existent values
|
// Test Inserting before/after non-existent values
|
||||||
lengthCheck = redis.Length("k1"); // Ensure that the length doesnt change
|
lengthCheck = redis.Length("k1"); // Ensure that the length doesn't change
|
||||||
ASSERT_EQ(lengthCheck, 10);
|
ASSERT_EQ(lengthCheck, 10);
|
||||||
ASSERT_EQ(redis.InsertBefore("k1", "non-exist", "randval"), lengthCheck);
|
ASSERT_EQ(redis.InsertBefore("k1", "non-exist", "randval"), lengthCheck);
|
||||||
ASSERT_EQ(redis.InsertAfter("k1", "nothing", "a"), lengthCheck);
|
ASSERT_EQ(redis.InsertAfter("k1", "nothing", "a"), lengthCheck);
|
||||||
@ -723,7 +723,7 @@ TEST(RedisListsTest, PersistenceMultiKeyTest) {
|
|||||||
|
|
||||||
// Block three: Verify the changes from block 2
|
// Block three: Verify the changes from block 2
|
||||||
{
|
{
|
||||||
RedisLists redis(kDefaultDbName, options, false); // Presistent, non-destructive
|
RedisLists redis(kDefaultDbName, options, false); // Persistent, non-destructive
|
||||||
|
|
||||||
// Check
|
// Check
|
||||||
ASSERT_EQ(redis.Length("k1"), 7);
|
ASSERT_EQ(redis.Length("k1"), 7);
|
||||||
|
@ -315,7 +315,7 @@ class TtlTest {
|
|||||||
|
|
||||||
// If TTL is non positive or not provided, the behaviour is TTL = infinity
|
// If TTL is non positive or not provided, the behaviour is TTL = infinity
|
||||||
// This test opens the db 3 times with such default behavior and inserts a
|
// This test opens the db 3 times with such default behavior and inserts a
|
||||||
// bunch of kvs each time. All kvs should accummulate in the db till the end
|
// bunch of kvs each time. All kvs should accumulate in the db till the end
|
||||||
// Partitions the sample-size provided into 3 sets over boundary1 and boundary2
|
// Partitions the sample-size provided into 3 sets over boundary1 and boundary2
|
||||||
TEST(TtlTest, NoEffect) {
|
TEST(TtlTest, NoEffect) {
|
||||||
MakeKVMap(kSampleSize_);
|
MakeKVMap(kSampleSize_);
|
||||||
|
Loading…
Reference in New Issue
Block a user