Skip to content

Conversation

@plebioda
Copy link

No description provided.

... otherwise all tests which rely on timestamps will fail
because the table logging will be enabled - see WiredTigerUtil::useTableLogging.
@plebioda plebioda requested a review from Copilot October 30, 2025 14:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the KVEngine test harness to handle ephemeral storage engines (e.g., in-memory WiredTiger) differently when testing last stable recovery timestamps. The changes address a behavioral difference where ephemeral engines set the last stable timestamp immediately upon calling setStableTimestamp(), while persistent engines only update it after a checkpoint.

Key changes:

  • Added conditional logic in test assertions to handle ephemeral vs. persistent storage engine behavior
  • Refactored in-memory test harness to properly initialize StorageEngine via StorageEngineImpl
  • Simplified test setup by replacing global settings calls with explicit local variables

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/mongo/db/storage/kv/kv_engine_test_harness.cpp Updated two tests to conditionally assert different behavior for ephemeral engines when checking last stable recovery timestamp
src/mongo/db/storage/inmemory/inmemory_kv_engine_test.cpp Refactored test harness helper to initialize engine via StorageEngineImpl and use explicit replica set configuration instead of global settings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…test

If the StorageEngineImpl is not created some of the tests fail due to
missing the _mdb_catalog which is created in the StorageEngineImpl constructor.
Update RollingBackToLastStable and CommitBehindStable test cases to handle
ephemeral storage engine behavior where the last stable recovery timestamp
is set immediately when setStableTimestamp is called, unlike non ephemeral
storage engine that require a checkpoint to advance the timestamp.
@plebioda plebioda force-pushed the PSMDB-1078-fix-inmemory_kv_engine_test-master branch from 0ce8049 to 688c452 Compare October 30, 2025 14:29
@plebioda plebioda requested review from igorsol and ktrushin October 30, 2025 14:29
Copy link

@ktrushin ktrushin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@plebioda plebioda merged commit 2d60c95 into master Nov 3, 2025
1 check passed
@plebioda plebioda deleted the PSMDB-1078-fix-inmemory_kv_engine_test-master branch November 3, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants