#34528

**Describe the bug**
[A link to the report](https://s3.amazonaws.com/clickhouse-test-reports/34528/6a8e35930ffc25f0574179c5ad93635cfe073121/stress_test__thread__actions_.html)


{
public:
    using WriteLock = std::unique_lock<std::shared_timed_mutex>;
    explicit LogSink(
        StorageLog & storage_, const StorageMetadataPtr & metadata_snapshot_, WriteLock && lock_)
        : SinkToStorage(metadata_snapshot_->getSampleBlock())
        , storage(storage_)
        , metadata_snapshot(metadata_snapshot_)
        , lock(std::move(lock_))
    {
        if (!lock)
            throw Exception("Lock timeout exceeded", ErrorCodes::TIMEOUT_EXCEEDED);
        
        storage.loadMarks(lock);
        
        storage.saveFileSizes(lock);
    }
    String getName() const override { return "LogSink"; }