Repository navigation
Conversation
|
Workflow [PR], commit [26de9b4] Summary: ❌
|
There was a problem hiding this comment.
This ignores the WriteMode::Append writes, which sounds very bad, since it is used in a few places in MergeTree code (at least), for example for txn_version.txt
Refs: 91cf0ff
There was a problem hiding this comment.
Here to avoid introducing extra complexity for experimental feature the append writes had been replaced with rewriting file from scratch via rename
Refs: a27e4fc
I think we try to solve the same problem. Please take a look. |
|
@tuanpach thanks for coming by! Yes, we do solve the same problem:
@tuanpach what do you think? |
|
Can we always avoid appends? |
|
There is one case when the transaction is rolled back: ClickHouse/src/Interpreters/MergeTreeTransaction.cpp Lines 310 to 311 in cab7eaf When calling ClickHouse/src/Interpreters/TransactionVersionMetadata.cpp Lines 311 to 318 in a7f922c Then, it calls However, in this PR, we call |
Do we need MergeTree transactions with this disk? Can we just disallow it? |
Note that for i.e. remote storages it is not optimal, since it will add one more blob, while for local disks it does make sense to write with append and we can have a separate path for local disks, but, transactions are experimental, let's not introduce code that will not be tested. Also I've tried couple of other ideas, but the interface became more complex, and I am not sure that it worth it for experimental functionality. v2: fix rollback (thanks to Tuan)
Sure we can, but I was thinking that if it was required only in this place (actually also for deduplication log) it will be easier to remove it, but I'm ok with both approaches. Do you have strong feeling about this? |
|
That's cool, removing appends is a much cleaner approach! |
|
There is a refactoring PR for VersionMetadata: #87125 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix MergeTree transactions on disks with plain_rewritable metadata by avoiding append mode
Fixes: #50666
Fixes: #83988