summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahoo-inc.com>2017-06-19 16:45:28 +0200
committerTor Brede Vekterli <vekterli@yahoo-inc.com>2017-06-19 16:45:28 +0200
commitf43c48cc8d87abd801228a8ce900e3a93a203b68 (patch)
treeabd17b8a922cfff043b1cf885495569d03e03403 /storage
parent19a2da5fc2ace7079171e280da21e49d5a4ad149 (diff)
Add ready state to bucket meta info printing
Diffstat (limited to 'storage')
-rw-r--r--storage/src/tests/distributor/bucketdatabasetest.cpp20
-rw-r--r--storage/src/tests/distributor/bucketdbupdatertest.cpp40
-rw-r--r--storage/src/tests/distributor/bucketstateoperationtest.cpp10
-rw-r--r--storage/src/tests/distributor/distributortest.cpp34
-rw-r--r--storage/src/tests/distributor/idealstatemanagertest.cpp8
-rw-r--r--storage/src/tests/distributor/putoperationtest.cpp12
-rw-r--r--storage/src/tests/distributor/removebucketoperationtest.cpp4
-rw-r--r--storage/src/tests/distributor/statecheckerstest.cpp30
-rw-r--r--storage/src/tests/distributor/statoperationtest.cpp4
-rw-r--r--storage/src/tests/distributor/updateoperationtest.cpp4
-rw-r--r--storage/src/vespa/storage/bucketdb/bucketcopy.cpp1
11 files changed, 84 insertions, 83 deletions
diff --git a/storage/src/tests/distributor/bucketdatabasetest.cpp b/storage/src/tests/distributor/bucketdatabasetest.cpp
index 204bbbbc830..ecfdc127fc2 100644
--- a/storage/src/tests/distributor/bucketdatabasetest.cpp
+++ b/storage/src/tests/distributor/bucketdatabasetest.cpp
@@ -134,11 +134,11 @@ BucketDatabaseTest::testIterating() {
CPPUNIT_ASSERT_EQUAL(
std::string(
"BucketId(0x4000000000000010) : "
- "node(idx=1,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false)\n"
+ "node(idx=1,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false,ready=false)\n"
"BucketId(0x400000000000002a) : "
- "node(idx=3,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false)\n"
+ "node(idx=3,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false,ready=false)\n"
"BucketId(0x400000000000000b) : "
- "node(idx=2,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false)\n"),
+ "node(idx=2,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false,ready=false)\n"),
proc.ost.str());
}
@@ -149,7 +149,7 @@ BucketDatabaseTest::testIterating() {
CPPUNIT_ASSERT_EQUAL(
std::string(
"BucketId(0x400000000000000b) : "
- "node(idx=2,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false)\n"),
+ "node(idx=2,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false,ready=false)\n"),
proc.ost.str());
}
@@ -160,9 +160,9 @@ BucketDatabaseTest::testIterating() {
CPPUNIT_ASSERT_EQUAL(
std::string(
"BucketId(0x4000000000000010) : "
- "node(idx=1,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false)\n"
+ "node(idx=1,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false,ready=false)\n"
"BucketId(0x400000000000002a) : "
- "node(idx=3,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false)\n"),
+ "node(idx=3,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false,ready=false)\n"),
proc.ost.str());
}
@@ -176,12 +176,12 @@ BucketDatabaseTest::testIterating() {
CPPUNIT_ASSERT_EQUAL(
std::string(
"BucketId(0x4000000000000010) : "
- "node(idx=1,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false)\n"
+ "node(idx=1,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false,ready=false)\n"
"BucketId(0x400000000000002a) : "
- "node(idx=4,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false), "
- "node(idx=5,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false)\n"
+ "node(idx=4,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false,ready=false), "
+ "node(idx=5,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false,ready=false)\n"
"BucketId(0x400000000000000b) : "
- "node(idx=7,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false)\n"),
+ "node(idx=7,crc=0x0,docs=0/0,bytes=1/1,trusted=false,active=false,ready=false)\n"),
proc.ost.str());
}
}
diff --git a/storage/src/tests/distributor/bucketdbupdatertest.cpp b/storage/src/tests/distributor/bucketdbupdatertest.cpp
index 73e9d252d93..e4b23f9d46d 100644
--- a/storage/src/tests/distributor/bucketdbupdatertest.cpp
+++ b/storage/src/tests/distributor/bucketdbupdatertest.cpp
@@ -860,8 +860,8 @@ BucketDBUpdaterTest::testNodeDownCopiesGetInSync()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=0,crc=0x3,docs=3/3,bytes=3/3,trusted=true,active=false), "
- "node(idx=2,crc=0x3,docs=3/3,bytes=3/3,trusted=true,active=false)"),
+ "node(idx=0,crc=0x3,docs=3/3,bytes=3/3,trusted=true,active=false,ready=false), "
+ "node(idx=2,crc=0x3,docs=3/3,bytes=3/3,trusted=true,active=false,ready=false)"),
dumpBucket(bid));
}
@@ -933,11 +933,11 @@ BucketDBUpdaterTest::testBitChange()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false)"),
+ "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false,ready=false)"),
dumpBucket(bucketlist[0]));
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000002) : "
- "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false)"),
+ "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false,ready=false)"),
dumpBucket(bucketlist[1]));
{
@@ -971,19 +971,19 @@ BucketDBUpdaterTest::testBitChange()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000000) : "
- "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false)"),
+ "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 0)));
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false)"),
+ "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 1)));
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000002) : "
- "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false)"),
+ "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 2)));
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000004) : "
- "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false)"),
+ "node(idx=0,crc=0xa,docs=1/1,bytes=1/1,trusted=true,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 4)));
{
@@ -1126,7 +1126,7 @@ BucketDBUpdaterTest::testNotifyBucketChange()
// No database update until request bucket info replies have been received.
CPPUNIT_ASSERT_EQUAL(std::string("BucketId(0x4000000000000001) : "
"node(idx=0,crc=0x4d2,docs=1234/1234,bytes=1234/1234,"
- "trusted=false,active=false)"),
+ "trusted=false,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 1)));
CPPUNIT_ASSERT_EQUAL(std::string("NONEXISTING"),
dumpBucket(document::BucketId(16, 2)));
@@ -1152,11 +1152,11 @@ BucketDBUpdaterTest::testNotifyBucketChange()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=0,crc=0x11d7,docs=200/400,bytes=2000/4000,trusted=true,active=true)"),
+ "node(idx=0,crc=0x11d7,docs=200/400,bytes=2000/4000,trusted=true,active=true,ready=true)"),
dumpBucket(document::BucketId(16, 1)));
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000002) : "
- "node(idx=0,crc=0x2327,docs=300/500,bytes=3000/5000,trusted=true,active=false)"),
+ "node(idx=0,crc=0x2327,docs=300/500,bytes=3000/5000,trusted=true,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 2)));
}
@@ -1183,7 +1183,7 @@ BucketDBUpdaterTest::testNotifyBucketChangeFromNodeDown()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=1,crc=0x4d2,docs=1234/1234,bytes=1234/1234,trusted=false,active=false)"),
+ "node(idx=1,crc=0x4d2,docs=1234/1234,bytes=1234/1234,trusted=false,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 1)));
CPPUNIT_ASSERT_EQUAL(size_t(1), _sender.replies.size());
@@ -1209,7 +1209,7 @@ BucketDBUpdaterTest::testNotifyBucketChangeFromNodeDown()
// No change
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=1,crc=0x4d2,docs=1234/1234,bytes=1234/1234,trusted=false,active=false)"),
+ "node(idx=1,crc=0x4d2,docs=1234/1234,bytes=1234/1234,trusted=false,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 1)));
}
@@ -1307,9 +1307,9 @@ BucketDBUpdaterTest::testMergeReply()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x40000000000004d2) : "
- "node(idx=0,crc=0xa,docs=100/100,bytes=1000/1000,trusted=false,active=false), "
- "node(idx=1,crc=0x14,docs=200/200,bytes=2000/2000,trusted=false,active=false), "
- "node(idx=2,crc=0x1e,docs=300/300,bytes=3000/3000,trusted=false,active=false)"),
+ "node(idx=0,crc=0xa,docs=100/100,bytes=1000/1000,trusted=false,active=false,ready=false), "
+ "node(idx=1,crc=0x14,docs=200/200,bytes=2000/2000,trusted=false,active=false,ready=false), "
+ "node(idx=2,crc=0x1e,docs=300/300,bytes=3000/3000,trusted=false,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 1234)));
};
@@ -1355,8 +1355,8 @@ BucketDBUpdaterTest::testMergeReplyNodeDown()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x40000000000004d2) : "
- "node(idx=0,crc=0xa,docs=100/100,bytes=1000/1000,trusted=false,active=false), "
- "node(idx=1,crc=0x14,docs=200/200,bytes=2000/2000,trusted=false,active=false)"),
+ "node(idx=0,crc=0xa,docs=100/100,bytes=1000/1000,trusted=false,active=false,ready=false), "
+ "node(idx=1,crc=0x14,docs=200/200,bytes=2000/2000,trusted=false,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 1234)));
};
@@ -1402,8 +1402,8 @@ BucketDBUpdaterTest::testMergeReplyNodeDownAfterRequestSent()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x40000000000004d2) : "
- "node(idx=0,crc=0xa,docs=100/100,bytes=1000/1000,trusted=false,active=false), "
- "node(idx=1,crc=0x14,docs=200/200,bytes=2000/2000,trusted=false,active=false)"),
+ "node(idx=0,crc=0xa,docs=100/100,bytes=1000/1000,trusted=false,active=false,ready=false), "
+ "node(idx=1,crc=0x14,docs=200/200,bytes=2000/2000,trusted=false,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 1234)));
};
diff --git a/storage/src/tests/distributor/bucketstateoperationtest.cpp b/storage/src/tests/distributor/bucketstateoperationtest.cpp
index 6bd18e0d798..32fbea1be7d 100644
--- a/storage/src/tests/distributor/bucketstateoperationtest.cpp
+++ b/storage/src/tests/distributor/bucketstateoperationtest.cpp
@@ -49,7 +49,7 @@ BucketStateOperationTest::testActiveStateSupportedInBucketDb()
CPPUNIT_ASSERT(entry->getNode(0)->active());
CPPUNIT_ASSERT_EQUAL(
std::string("node(idx=0,crc=0xabc,docs=10/10,bytes=1100/1100,"
- "trusted=true,active=true)"),
+ "trusted=true,active=true,ready=false)"),
entry->getNode(0)->toString());
}
@@ -148,11 +148,11 @@ BucketStateOperationTest::testActivateAndDeactivateNodes()
CPPUNIT_ASSERT(entry.valid());
CPPUNIT_ASSERT_EQUAL(
std::string("node(idx=0,crc=0xabc,docs=10/10,bytes=1100/1100,"
- "trusted=true,active=false)"),
+ "trusted=true,active=false,ready=false)"),
entry->getNodeRef(0).toString());
CPPUNIT_ASSERT_EQUAL(
std::string("node(idx=1,crc=0xdef,docs=15/15,bytes=1500/1500,"
- "trusted=false,active=true)"),
+ "trusted=false,active=true,ready=false)"),
entry->getNodeRef(1).toString());
CPPUNIT_ASSERT(op.ok());
@@ -198,11 +198,11 @@ BucketStateOperationTest::testDoNotDeactivateIfActivateFails()
CPPUNIT_ASSERT(entry.valid());
CPPUNIT_ASSERT_EQUAL(
std::string("node(idx=0,crc=0xabc,docs=10/10,bytes=1100/1100,"
- "trusted=true,active=true)"),
+ "trusted=true,active=true,ready=false)"),
entry->getNodeRef(0).toString());
CPPUNIT_ASSERT_EQUAL(
std::string("node(idx=1,crc=0xdef,docs=15/15,bytes=1500/1500,"
- "trusted=false,active=false)"),
+ "trusted=false,active=false,ready=false)"),
entry->getNodeRef(1).toString());
CPPUNIT_ASSERT(!op.ok());
diff --git a/storage/src/tests/distributor/distributortest.cpp b/storage/src/tests/distributor/distributortest.cpp
index 166088e31ab..bfa1181eca1 100644
--- a/storage/src/tests/distributor/distributortest.cpp
+++ b/storage/src/tests/distributor/distributortest.cpp
@@ -310,54 +310,54 @@ Distributor_Test::testUpdateBucketDatabase()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=0,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false), "
- "node(idx=1,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false)"
+ "node(idx=0,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false,ready=false), "
+ "node(idx=1,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false,ready=false)"
),
updateBucketDB("0:456,1:456,2:789", "2:r"));
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=0,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false), "
- "node(idx=2,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false), "
- "node(idx=1,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false)"
+ "node(idx=0,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false,ready=false), "
+ "node(idx=2,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false,ready=false), "
+ "node(idx=1,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false,ready=false)"
),
updateBucketDB("0:456,1:456", "2:456"));
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=0,crc=0x315,docs=394/394,bytes=197/197,trusted=false,active=false), "
- "node(idx=2,crc=0x14d,docs=166/166,bytes=83/83,trusted=false,active=false), "
- "node(idx=1,crc=0x34a,docs=421/421,bytes=210/210,trusted=false,active=false)"
+ "node(idx=0,crc=0x315,docs=394/394,bytes=197/197,trusted=false,active=false,ready=false), "
+ "node(idx=2,crc=0x14d,docs=166/166,bytes=83/83,trusted=false,active=false,ready=false), "
+ "node(idx=1,crc=0x34a,docs=421/421,bytes=210/210,trusted=false,active=false,ready=false)"
),
updateBucketDB("0:456:t,1:456:t,2:123", "0:789,1:842,2:333"));
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=0,crc=0x315,docs=394/394,bytes=197/197,trusted=true,active=false), "
- "node(idx=2,crc=0x14d,docs=166/166,bytes=83/83,trusted=false,active=false), "
- "node(idx=1,crc=0x315,docs=394/394,bytes=197/197,trusted=true,active=false)"
+ "node(idx=0,crc=0x315,docs=394/394,bytes=197/197,trusted=true,active=false,ready=false), "
+ "node(idx=2,crc=0x14d,docs=166/166,bytes=83/83,trusted=false,active=false,ready=false), "
+ "node(idx=1,crc=0x315,docs=394/394,bytes=197/197,trusted=true,active=false,ready=false)"
),
updateBucketDB("0:456:t,1:456:t,2:123", "0:789,1:789,2:333"));
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=2,crc=0x14d,docs=166/166,bytes=83/83,trusted=true,active=false)"),
+ "node(idx=2,crc=0x14d,docs=166/166,bytes=83/83,trusted=true,active=false,ready=false)"),
updateBucketDB("0:456:t,1:456:t", "0:r,1:r,2:333"));
// Copies are in sync so should still be trusted even if explicitly reset.
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=0,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false), "
- "node(idx=2,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false), "
- "node(idx=1,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false)"
+ "node(idx=0,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false,ready=false), "
+ "node(idx=2,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false,ready=false), "
+ "node(idx=1,crc=0x1c8,docs=228/228,bytes=114/114,trusted=true,active=false,ready=false)"
),
updateBucketDB("0:456,1:456", "2:456", ResetTrusted(true)));
// When resetting, first inserted copy should not end up as implicitly trusted.
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000000001) : "
- "node(idx=0,crc=0x1c8,docs=228/228,bytes=114/114,trusted=false,active=false), "
- "node(idx=2,crc=0x14d,docs=166/166,bytes=83/83,trusted=false,active=false)"
+ "node(idx=0,crc=0x1c8,docs=228/228,bytes=114/114,trusted=false,active=false,ready=false), "
+ "node(idx=2,crc=0x14d,docs=166/166,bytes=83/83,trusted=false,active=false,ready=false)"
),
updateBucketDB("0:456",
"2:333",
diff --git a/storage/src/tests/distributor/idealstatemanagertest.cpp b/storage/src/tests/distributor/idealstatemanagertest.cpp
index 105db949caa..83b147f4125 100644
--- a/storage/src/tests/distributor/idealstatemanagertest.cpp
+++ b/storage/src/tests/distributor/idealstatemanagertest.cpp
@@ -87,10 +87,10 @@ IdealStateManagerTest::testStatusPage() {
std::ostringstream ost;
getIdealStateManager().getBucketStatus(ost);
- CPPUNIT_ASSERT_EQUAL(std::string("BucketId(0x4000000000000002) : [node(idx=0,crc=0xff,docs=10/10,bytes=10/10,trusted=true,active=true)]<br>\n"
+ CPPUNIT_ASSERT_EQUAL(std::string("BucketId(0x4000000000000002) : [node(idx=0,crc=0xff,docs=10/10,bytes=10/10,trusted=true,active=true,ready=false)]<br>\n"
"<b>BucketId(0x4000000000000005):</b> <i> : split: [Splitting bucket because its maximum size (200 b, 100 docs, 100 meta, 200 b total) is "
"higher than the configured limit of (100, 1000000)]</i> [node(idx=0,crc=0xff,docs=100/100,bytes=200/200,trusted=true,"
- "active=true)]<br>\n"),
+ "active=true,ready=false)]<br>\n"),
ost.str());
}
@@ -109,10 +109,10 @@ IdealStateManagerTest::testDisabledStateChecker() {
getIdealStateManager().getBucketStatus(ost);
CPPUNIT_ASSERT_EQUAL(std::string(
- "BucketId(0x4000000000000002) : [node(idx=0,crc=0xff,docs=10/10,bytes=10/10,trusted=true,active=true)]<br>\n"
+ "BucketId(0x4000000000000002) : [node(idx=0,crc=0xff,docs=10/10,bytes=10/10,trusted=true,active=true,ready=false)]<br>\n"
"<b>BucketId(0x4000000000000005):</b> <i> : split: [Splitting bucket because its maximum size (200 b, 100 docs, 100 meta, 200 b total) is "
"higher than the configured limit of (100, 1000000)]</i> [node(idx=0,crc=0xff,docs=100/100,bytes=200/200,trusted=true,"
- "active=true)]<br>\n"),
+ "active=true,ready=false)]<br>\n"),
ost.str());
tick();
diff --git a/storage/src/tests/distributor/putoperationtest.cpp b/storage/src/tests/distributor/putoperationtest.cpp
index 3b4bc887d8c..bec07c299d9 100644
--- a/storage/src/tests/distributor/putoperationtest.cpp
+++ b/storage/src/tests/distributor/putoperationtest.cpp
@@ -212,7 +212,7 @@ PutOperationTest::testBucketDatabaseGetsSpecialEntryWhenCreateBucketSent()
// Database updated before CreateBucket is sent
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000008b13) : "
- "node(idx=0,crc=0x1,docs=0/0,bytes=0/0,trusted=true,active=true)"),
+ "node(idx=0,crc=0x1,docs=0/0,bytes=0/0,trusted=true,active=true,ready=false)"),
dumpBucket(getExternalOperationHandler().getBucketId(doc->getId())));
CPPUNIT_ASSERT_EQUAL(std::string("Create bucket => 0,Put => 0"),
@@ -322,9 +322,9 @@ PutOperationTest::testMultipleCopies()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000008b13) : "
- "node(idx=3,crc=0x1,docs=2/4,bytes=3/5,trusted=true,active=false), "
- "node(idx=1,crc=0x1,docs=2/4,bytes=3/5,trusted=true,active=false), "
- "node(idx=0,crc=0x1,docs=2/4,bytes=3/5,trusted=true,active=false)"),
+ "node(idx=3,crc=0x1,docs=2/4,bytes=3/5,trusted=true,active=false,ready=false), "
+ "node(idx=1,crc=0x1,docs=2/4,bytes=3/5,trusted=true,active=false,ready=false), "
+ "node(idx=0,crc=0x1,docs=2/4,bytes=3/5,trusted=true,active=false,ready=false)"),
dumpBucket(getExternalOperationHandler().getBucketId(doc->getId())));
}
@@ -558,7 +558,7 @@ PutOperationTest::testUpdateCorrectBucketOnRemappedPut()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x440000000000000d) : "
- "node(idx=0,crc=0x1,docs=2/4,bytes=3/5,trusted=true,active=false)"),
+ "node(idx=0,crc=0x1,docs=2/4,bytes=3/5,trusted=true,active=false,ready=false)"),
dumpBucket(document::BucketId(17, 13)));
}
@@ -649,7 +649,7 @@ PutOperationTest::testDoNotResurrectDownedNodesInBucketDB()
CPPUNIT_ASSERT_EQUAL(
std::string("BucketId(0x4000000000002a52) : "
- "node(idx=0,crc=0x5,docs=6/6,bytes=7/7,trusted=true,active=false)"),
+ "node(idx=0,crc=0x5,docs=6/6,bytes=7/7,trusted=true,active=false,ready=false)"),
dumpBucket(getExternalOperationHandler().getBucketId(doc->getId())));
}
diff --git a/storage/src/tests/distributor/removebucketoperationtest.cpp b/storage/src/tests/distributor/removebucketoperationtest.cpp
index 0d6c22a3782..d9f6518d694 100644
--- a/storage/src/tests/distributor/removebucketoperationtest.cpp
+++ b/storage/src/tests/distributor/removebucketoperationtest.cpp
@@ -64,7 +64,7 @@ RemoveBucketOperationTest::testSimple()
CPPUNIT_ASSERT_EQUAL(
std::string(
"BucketId(0x4000000000000001) : "
- "node(idx=0,crc=0xa,docs=100/100,bytes=1/1,trusted=true,active=false)"),
+ "node(idx=0,crc=0xa,docs=100/100,bytes=1/1,trusted=true,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 1)));
}
@@ -105,7 +105,7 @@ RemoveBucketOperationTest::testBucketInfoMismatchFailure()
CPPUNIT_ASSERT_EQUAL(
std::string(
"BucketId(0x4000000000000001) : "
- "node(idx=1,crc=0xa,docs=100/100,bytes=1/1,trusted=true,active=false)"),
+ "node(idx=1,crc=0xa,docs=100/100,bytes=1/1,trusted=true,active=false,ready=false)"),
dumpBucket(document::BucketId(16, 1)));
}
diff --git a/storage/src/tests/distributor/statecheckerstest.cpp b/storage/src/tests/distributor/statecheckerstest.cpp
index afa8893cde5..fbaa8a7662d 100644
--- a/storage/src/tests/distributor/statecheckerstest.cpp
+++ b/storage/src/tests/distributor/statecheckerstest.cpp
@@ -800,9 +800,9 @@ StateCheckersTest::testSynchronizeAndMove()
CheckerParams().expect(
"[Synchronizing buckets with different checksums "
"node(idx=0,crc=0x1,docs=1/1,bytes=1/1,trusted=false,"
- "active=false), "
+ "active=false,ready=false), "
"node(idx=1,crc=0x2,docs=2/2,bytes=2/2,trusted=false,"
- "active=false)] "
+ "active=false,ready=false)] "
"(scheduling pri MEDIUM)")
.bucketInfo("0=1,1=2")
.includeSchedulingPriority(true));
@@ -858,11 +858,11 @@ StateCheckersTest::testSynchronizeAndMove()
CheckerParams()
.expect("[Synchronizing buckets with different checksums "
"node(idx=0,crc=0x3,docs=3/3,bytes=3/3,trusted=false,"
- "active=false), "
+ "active=false,ready=false), "
"node(idx=1,crc=0x3,docs=3/3,bytes=3/3,trusted=false,"
- "active=false), "
+ "active=false,ready=false), "
"node(idx=2,crc=0x0,docs=0/0,bytes=0/0,trusted=false,"
- "active=false)]")
+ "active=false,ready=false)]")
.bucketInfo("0=3,1=3,2=0")
.clusterState("distributor:1 storage:3"));
@@ -872,13 +872,13 @@ StateCheckersTest::testSynchronizeAndMove()
CheckerParams()
.expect("[Synchronizing buckets with different checksums "
"node(idx=0,crc=0x2,docs=3/3,bytes=4/4,trusted=false,"
- "active=false), "
+ "active=false,ready=false), "
"node(idx=1,crc=0x1,docs=2/2,bytes=3/3,trusted=true,"
- "active=false), "
+ "active=false,ready=false), "
"node(idx=2,crc=0x1,docs=2/2,bytes=3/3,trusted=true,"
- "active=false), "
+ "active=false,ready=false), "
"node(idx=3,crc=0x1,docs=2/2,bytes=3/3,trusted=true,"
- "active=false)] "
+ "active=false,ready=false)] "
"(pri 120) (scheduling pri MEDIUM)")
.bucketInfo("0=2/3/4,1=1/2/3/t,2=1/2/3/t,3=1/2/3/t")
.clusterState("distributor:1 storage:5")
@@ -956,9 +956,9 @@ StateCheckersTest::retiredNodesOutOfSyncAreMerged()
CheckerParams()
.expect("[Synchronizing buckets with different checksums "
"node(idx=0,crc=0x1,docs=1/1,bytes=1/1,trusted=false,"
- "active=false), "
+ "active=false,ready=false), "
"node(idx=1,crc=0x2,docs=2/2,bytes=2/2,trusted=false,"
- "active=false)]")
+ "active=false,ready=false)]")
.bucketInfo("0=1,1=2")
.clusterState("distributor:1 storage:4 "
".0.s:r .1.s:r .2.s:r .3.s:r"));
@@ -1007,7 +1007,7 @@ StateCheckersTest::testDeleteExtraCopies()
CPPUNIT_ASSERT_EQUAL_MSG(
"Remove empty buckets",
std::string("[Removing all copies since bucket is empty:node(idx=0,crc=0x0,"
- "docs=0/0,bytes=0/0,trusted=false,active=false)]"
+ "docs=0/0,bytes=0/0,trusted=false,active=false,ready=false)]"
" (pri 100)"),
testDeleteExtraCopies("0=0", 2, PendingMessage(), "", true));
@@ -1073,9 +1073,9 @@ StateCheckersTest::testDeleteExtraCopies()
"Remove empty bucket with multiple copies",
std::string(
"[Removing all copies since bucket is empty:"
- "node(idx=0,crc=0x0,docs=0/0,bytes=0/0,trusted=false,active=false), "
- "node(idx=1,crc=0x0,docs=0/0,bytes=0/0,trusted=false,active=false), "
- "node(idx=2,crc=0x0,docs=0/0,bytes=0/0,trusted=false,active=false)]"),
+ "node(idx=0,crc=0x0,docs=0/0,bytes=0/0,trusted=false,active=false,ready=false), "
+ "node(idx=1,crc=0x0,docs=0/0,bytes=0/0,trusted=false,active=false,ready=false), "
+ "node(idx=2,crc=0x0,docs=0/0,bytes=0/0,trusted=false,active=false,ready=false)]"),
testDeleteExtraCopies("0=0/0/0,1=0/0/0,2=0/0/0"));
CPPUNIT_ASSERT_EQUAL_MSG(
diff --git a/storage/src/tests/distributor/statoperationtest.cpp b/storage/src/tests/distributor/statoperationtest.cpp
index c4298f8ce30..bbfac1e69fd 100644
--- a/storage/src/tests/distributor/statoperationtest.cpp
+++ b/storage/src/tests/distributor/statoperationtest.cpp
@@ -106,8 +106,8 @@ StatOperationTest::testBucketList() {
"[distributor:0] split: "
"[Splitting bucket because its maximum size (200 b, 100 docs, 100 meta, 200 b total) "
"is higher than the configured limit of (100, 10)] "
- "[node(idx=0,crc=0xff,docs=100/100,bytes=200/200,trusted=true,active=false), "
- "node(idx=1,crc=0xff,docs=100/100,bytes=200/200,trusted=true,active=true)]"),
+ "[node(idx=0,crc=0xff,docs=100/100,bytes=200/200,trusted=true,active=false,ready=false), "
+ "node(idx=1,crc=0xff,docs=100/100,bytes=200/200,trusted=true,active=true,ready=false)]"),
repl->getBuckets()[0]._bucketInformation);
}
diff --git a/storage/src/tests/distributor/updateoperationtest.cpp b/storage/src/tests/distributor/updateoperationtest.cpp
index 735edc1a86d..fdb6012800f 100644
--- a/storage/src/tests/distributor/updateoperationtest.cpp
+++ b/storage/src/tests/distributor/updateoperationtest.cpp
@@ -180,8 +180,8 @@ UpdateOperation_Test::testMultiNode()
CPPUNIT_ASSERT_EQUAL(
std::string(
_bId.toString() + " : "
- "node(idx=1,crc=0x2,docs=4/4,bytes=6/6,trusted=true,active=false), "
- "node(idx=0,crc=0x2,docs=4/4,bytes=6/6,trusted=true,active=false)"),
+ "node(idx=1,crc=0x2,docs=4/4,bytes=6/6,trusted=true,active=false,ready=false), "
+ "node(idx=0,crc=0x2,docs=4/4,bytes=6/6,trusted=true,active=false,ready=false)"),
dumpBucket(_bId));
}
diff --git a/storage/src/vespa/storage/bucketdb/bucketcopy.cpp b/storage/src/vespa/storage/bucketdb/bucketcopy.cpp
index 8657d769c19..5884caf1421 100644
--- a/storage/src/vespa/storage/bucketdb/bucketcopy.cpp
+++ b/storage/src/vespa/storage/bucketdb/bucketcopy.cpp
@@ -14,6 +14,7 @@ BucketCopy::print(std::ostream& out, bool /*verbose*/, const std::string&) const
<< ",bytes=" << getTotalDocumentSize() << "/" << getUsedFileSize()
<< ",trusted=" << (trusted() ? "true" : "false")
<< ",active=" << (active() ? "true" : "false")
+ << ",ready=" << (ready() ? "true" : "false")
<< ")";
}