Skip to content

Commit 79b5f30

Browse files
louiswilliamsEvergreen Agent
authored and
Evergreen Agent
committed
Revert "SERVER-74714 Make drop-pending ident log message less noisy"
This reverts commit 161833d.
1 parent 58fb089 commit 79b5f30

File tree

3 files changed

+13
-30
lines changed

3 files changed

+13
-30
lines changed

jstests/noPassthrough/collection_catalog_two_phase_drops.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ checkLog.containsJson(primary, 6825301, {
8383
assert.commandWorked(db.adminCommand({appendOplogNote: 1, data: {msg: "advance timestamp"}}));
8484
assert.commandWorked(db.adminCommand({fsync: 1}));
8585

86-
// "The ident was successfully dropped".
87-
checkLog.containsJson(primary, 6776600, {
86+
// Completing drop for ident.
87+
checkLog.containsJson(primary, 22237, {
8888
ident: function(ident) {
8989
return ident == xIndexUri;
9090
}
@@ -133,13 +133,13 @@ checkLog.containsJson(primary, 6825300, {
133133
assert.commandWorked(db.adminCommand({appendOplogNote: 1, data: {msg: "advance timestamp"}}));
134134
assert.commandWorked(db.adminCommand({fsync: 1}));
135135

136-
// "The ident was successfully dropped".
137-
checkLog.containsJson(primary, 6776600, {
136+
// Completing drop for ident.
137+
checkLog.containsJson(primary, 22237, {
138138
ident: function(ident) {
139139
return ident == collUri;
140140
}
141141
});
142-
checkLog.containsJson(primary, 6776600, {
142+
checkLog.containsJson(primary, 22237, {
143143
ident: function(ident) {
144144
return ident == idIndexUri;
145145
}

jstests/noPassthrough/drop_pending_retry.js

+7-13
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const rst = new ReplSetTest({
1818
setParameter: {
1919
// Set the history window to zero to explicitly control the oldest timestamp.
2020
minSnapshotHistoryWindowInSeconds: 0,
21-
logComponentVerbosity: tojson({storage: 1}),
2221
}
2322
}
2423
});
@@ -52,25 +51,20 @@ assert.commandWorked(db.getCollection("toWrite").insert({x: 1}));
5251
// Take a checkpoint to advance the checkpoint timestamp.
5352
assert.commandWorked(db.adminCommand({fsync: 1}));
5453

55-
// Tests that the table drops are retried when the drop pending reaper runs. Once for the collection
56-
// and once for the index.
57-
checkLog.containsWithAtLeastCount(primary, "Drop-pending ident is still in use", 2);
54+
// Tests that the table drops are retried each time the drop pending reaper runs until they succeed.
55+
// We wait for 5 retries here. 5 for the collection table and 5 for the index table.
56+
checkLog.containsWithAtLeastCount(primary, "Drop-pending ident is still in use", 2 * 5);
5857

5958
// Let the table drops succeed.
6059
assert.commandWorked(primary.adminCommand({configureFailPoint: "WTDropEBUSY", mode: "off"}));
6160

62-
// Perform another write and another checkpoint to advance the checkpoint timestamp, triggering
63-
// the reaper.
64-
assert.commandWorked(db.getCollection("toWrite").insert({x: 1}));
65-
assert.commandWorked(db.adminCommand({fsync: 1}));
66-
67-
// "The ident was successfully dropped".
68-
checkLog.containsJson(primary, 6776600, {
61+
// Completing drop for ident
62+
checkLog.containsJson(primary, 22237, {
6963
ident: function(ident) {
7064
return ident == collUri;
7165
}
7266
});
73-
checkLog.containsJson(primary, 6776600, {
67+
checkLog.containsJson(primary, 22237, {
7468
ident: function(ident) {
7569
return ident == indexUri;
7670
}
@@ -80,4 +74,4 @@ assert.commandWorked(
8074
primary.adminCommand({configureFailPoint: "pauseCheckpointThread", mode: "off"}));
8175

8276
rst.stopSet();
83-
}());
77+
}());

src/mongo/db/storage/storage_engine_impl.cpp

+1-12
Original file line numberDiff line numberDiff line change
@@ -1230,18 +1230,7 @@ void StorageEngineImpl::checkpoint(OperationContext* opCtx) {
12301230
void StorageEngineImpl::_onMinOfCheckpointAndOldestTimestampChanged(const Timestamp& timestamp) {
12311231
// No drop-pending idents present if getEarliestDropTimestamp() returns boost::none.
12321232
if (auto earliestDropTimestamp = _dropPendingIdentReaper.getEarliestDropTimestamp()) {
1233-
1234-
auto checkpoint = _engine->getCheckpointTimestamp();
1235-
auto oldest = _engine->getOldestTimestamp();
1236-
1237-
// We won't try to drop anything unless we know it is both safe to drop (older than the
1238-
// oldest timestamp) and present in a checkpoint. Otherwise, the drop will fail, and we'll
1239-
// keep attempting a drop for each new `timestamp`. Note that this is not required for
1240-
// correctness and is only done to avoid unnecessary work and spamming the logs when we
1241-
// actually have nothing to do. Additionally, these values may have both advanced since
1242-
// `timestamp` was calculated, but this is not expected to be common and does not affect
1243-
// correctness.
1244-
if (checkpoint >= *earliestDropTimestamp && oldest >= *earliestDropTimestamp) {
1233+
if (timestamp >= *earliestDropTimestamp) {
12451234
LOGV2(22260,
12461235
"Removing drop-pending idents with drop timestamps before timestamp",
12471236
"timestamp"_attr = timestamp);

0 commit comments

Comments
 (0)