lilei1128 commented on PR #7563:
URL: https://github.com/apache/paimon/pull/7563#issuecomment-4161928376
> Hi, thanks for this PR! I'm just wondering that if it's necessary to reuse
current BTree codebase? For example:
>
> 1. in the btree index build topo, current implementation will decide the
partition num by records number per range, and split ranges by partition, which
may be not suitable for your case.
> 2. And also, it seems that the `BTREE_WITH_FILE_META` option will create a
total different index type compared to BTree.
The "with-file-meta" is NOT a completely different index type. It's:
- btree key-index (key → rowId bitmap) - SAME as regular btree
- btree_file_meta (fileName → ManifestEntry) - ADDITIONAL metadata file
For first question, you're right that the parallelism logic is designed for
key-index.
Currently, when parallelism > 1, each subtask writes a complete file-meta
SST.
I've handled this with **read-time deduplication** using
LinkedHashMap.putIfAbsent()
in BTreeWithFileMetaReader - duplicate entries are filtered out during
query. Long term solution, we can:
1. Write file-meta only in subtask 0 (write-time serialization)
2. Or deduplicate at commit time (though this leaves orphan files)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]