Avoid writing to finalized buffer in File-like storages#65063
Avoid writing to finalized buffer in File-like storages#65063Avogar merged 2 commits intoClickHouse:masterfrom
Conversation
|
This is an automated comment for commit d9ff408 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page
Successful checks
|
| { | ||
| writer.reset(); | ||
| write_buf.reset(); | ||
| write_buf->finalize(); |
There was a problem hiding this comment.
I assume finalize() was not called here on purpose 2c018f5#diff-a118e043f3175929dbe8a96c6dcc7db80e31ddae5581f29b4286eb9e2d9d925d
There was a problem hiding this comment.
I was confused because StorageFile and StorageURL had finalize() in the same place (and before StorageObject only StorageS3 didn't have finalize()). I am still not 100% sure that it's safe to just call .reset() here as we still can call finalize in destructor. Let me check the write buffers that could be used, maybe it's actually safe and we can use .reset() in all such places
There was a problem hiding this comment.
and before StorageObject only StorageS3 didn't have finalize()
Yeah I also noticed that during refactoring (this finalize() was also there for StorageAzure) and changed it the same way, but it resulted in failing s3 tests
6e2d2c0 to
d9ff408
Compare
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Avoid writing to finalized buffer in File-like storages
Closes #62962.
Documentation entry for user-facing changes
CI Settings (Only check the boxes if you know what you are doing):