Fix some rare cases when write errors can be ignored in destructors. #19451 (Azat Khuzhin).
Fixes rare cases where write errors are ignored in destructors during data writing operations.
Why it matters
This fix ensures that write errors occurring during object destruction are properly handled and not silently ignored, improving data integrity and error visibility for users.
How to use it
No user action is required. The fix is applied automatically as part of the update.