apache / apache/paimon

[Feature] Reuse RocksDB in FullCacheLookupTable

Open
#5,672 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
3.4k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
396

Description

### Search before asking

- [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.

### Motivation

In the case of Flink‘s lookup joins with _FullCacheLookupTable_ , within the same TaskManager process, each task currently creates a separate RocksDB instance to cache the table data.
I observed that ​​**each RocksDB instance fully caches the entire dataset of the table​​**, which may lead to some memory and disk waste, especially when the lookup table is large.

Actually, I believe that for the same table within a single TaskManager, we only need ​​one shared RocksDB instance​​ to cache the data. All tasks in the same TaskManager could reuse this shared RocksDB, thereby saving substantial memory and disk overhead.

### Solution

As proposed above, I suggest ​​**implementing a TaskManager-level shared RocksDB cache​**​ for the same lookup table.

### Anything else?

_No response_

### Are you willing to submit a PR?

- [x] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating FullCacheLookupTable and the code path that creates its RocksDB cache, then trace how Flink tasks share resources within one TaskManager. Done means tasks for the same lookup table reuse one TaskManager-level cache without creating duplicate full-table RocksDB instances, while preserving lookup behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.