Repository navigation
[Fastshard] Recreate the journalled device when it is formatted - #7616
arigachnyy wants to merge 3 commits into
Conversation
|
Note This is an automated comment that will be appended during run. Note All workloads for linux-x86_64-relwithdebinfo have completed. Tip Planned checks for linux-x86_64-relwithdebinfo. 🟢 linux-x86_64-relwithdebinfo target: cloud/tasks/,cloud/storage/,cloud/fastshard/ (test time: 271s): all tests PASSED for commit aa23f0b.
🟢 linux-x86_64-relwithdebinfo target: cloud/disk_manager/ (test time: 333s): all tests PASSED for commit aa23f0b.
🔴 linux-x86_64-relwithdebinfo target: cloud/blockstore/ (test time: 1646s): some tests FAILED for commit aa23f0b.
🔴 linux-x86_64-relwithdebinfo target: cloud/blockstore/ (test time: 26s): some tests FAILED for commit aa23f0b.
🔴 linux-x86_64-relwithdebinfo target: cloud/blockstore/ (test time: 14s): some tests FAILED for commit aa23f0b.
🔴 linux-x86_64-relwithdebinfo target: cloud/filestore/ (test time: 5460s) Test run completed, no test results found for commit aa23f0b. 🟢 linux-x86_64-relwithdebinfo target: cloud/filestore/ (test time: 5044s): all tests PASSED for commit aa23f0b.
|
aa23f0b to
a3b28d9
Compare
|
Note This is an automated comment that will be appended during run. Note All workloads for linux-x86_64-relwithdebinfo have completed. Tip Planned checks for linux-x86_64-relwithdebinfo. 🟢 linux-x86_64-relwithdebinfo target: cloud/tasks/,cloud/storage/,cloud/fastshard/ (test time: 267s): all tests PASSED for commit a3b28d9.
🟢 linux-x86_64-relwithdebinfo target: cloud/disk_manager/ (test time: 319s): all tests PASSED for commit a3b28d9.
🔴 linux-x86_64-relwithdebinfo target: cloud/blockstore/ (test time: 1590s): some tests FAILED for commit a3b28d9.
🔴 linux-x86_64-relwithdebinfo target: cloud/blockstore/ (test time: 27s): some tests FAILED for commit a3b28d9.
🔴 linux-x86_64-relwithdebinfo target: cloud/blockstore/ (test time: 14s): some tests FAILED for commit a3b28d9.
🔴 linux-x86_64-relwithdebinfo target: cloud/filestore/ (test time: 5460s) Test run completed, no test results found for commit a3b28d9. 🟢 linux-x86_64-relwithdebinfo target: cloud/filestore/ (test time: 5071s): all tests PASSED for commit a3b28d9.
|
a3b28d9 to
a2c55b6
Compare
|
Note This is an automated comment that will be appended during run. Note All workloads for linux-x86_64-relwithdebinfo have completed. Tip Planned checks for linux-x86_64-relwithdebinfo.
|
FormatDevice now stops the journalled device, wipes the region and creates the device anew through the factory, so the device serves the freshly formatted region. A device that is not started, failed to start or failed to be recreated has no journalled device behind it, and every request to it is rejected with E_INVALID_STATE until the next format succeeds. The handler's Stop runs in the executor alongside the formats: it waits for the formats in flight, so the devices they start are stopped too, and rejects any format that comes afterwards.
a2c55b6 to
78ca67e
Compare
|
Note This is an automated comment that will be appended during run. Note All workloads for linux-x86_64-relwithdebinfo have completed. Tip Planned checks for linux-x86_64-relwithdebinfo. 🟢 linux-x86_64-relwithdebinfo target: cloud/tasks/,cloud/storage/,cloud/fastshard/ (test time: 271s): all tests PASSED for commit 78ca67e.
🟢 linux-x86_64-relwithdebinfo target: cloud/disk_manager/ (test time: 317s): all tests PASSED for commit 78ca67e.
🔴 linux-x86_64-relwithdebinfo target: cloud/blockstore/ (test time: 1544s): some tests FAILED for commit 78ca67e.
🔴 linux-x86_64-relwithdebinfo target: cloud/blockstore/ (test time: 26s): some tests FAILED for commit 78ca67e.
🔴 linux-x86_64-relwithdebinfo target: cloud/blockstore/ (test time: 14s): some tests FAILED for commit 78ca67e.
🟢 linux-x86_64-relwithdebinfo target: cloud/filestore/ (test time: 5095s): all tests PASSED for commit 78ca67e.
|
|
Note This is an automated comment that will be appended during run. Note All workloads for linux-x86_64-relwithdebinfo have completed. Tip Planned checks for linux-x86_64-relwithdebinfo. 🟢 linux-x86_64-relwithdebinfo target: cloud/fastshard/ (test time: 16s): all tests PASSED for commit 4057ccb.
|
| return TErrorResponse( | ||
| E_FAIL, | ||
| "TJournalledDeviceHandler is destroyed"); | ||
| if constexpr (std::is_void_v<T>) { |
| // completes | ||
| // | ||
|
|
||
| if (spec->Recreating.Initialized() && !spec->Recreating.HasValue()) { |
There was a problem hiding this comment.
needing to keep in mind that a future can be uninitialized makes the code more fragile
// and we'll also have a race as soon as we decide to add more executors
since Recreating is used only to sync with DoStop(), probably we can just use an integer which would track the number of inflight format ops and can check whether that integer is 0
and can add an event for waiting (in DoStop()) and signalling (from DoFormatDevice() - whenever a format completes)
There was a problem hiding this comment.
Fixed.
// and we'll also have a race as soon as we decide to add more executors
Yes and this isn't the only problem we'll need to fix if we decide to add more executors. It might require some minor refactoring. I'll think about it when I add executors.
|
Note This is an automated comment that will be appended during run. Note All workloads for linux-x86_64-relwithdebinfo have completed. Tip Planned checks for linux-x86_64-relwithdebinfo. 🟢 linux-x86_64-relwithdebinfo target: cloud/fastshard/ (test time: 16s): all tests PASSED for commit 2050367.
|
Notes
FormatDevice now stops the journalled device, wipes the region and
creates the device anew through the factory, so the device serves the
freshly formatted region.
A device that is not started, failed to start or failed to be recreated
has no journalled device behind it, and every request to it is rejected
with E_INVALID_STATE until the next format succeeds.
The handler's Stop runs in the executor alongside the formats: it waits
for the formats in flight, so the devices they start are stopped too,
and rejects any format that comes afterwards.
Issue
#6956