InMemorySetState.retract NPEs on an absent secondary-index key in MEMORY-cache lookup join
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start with InMemorySetState.retract and compare its absent-key behavior with LocalKvSetState.retract, then trace the calls from SecondaryIndexLookupTable.refreshRow. Reproduce the MEMORY-cache lookup join with a filtered-out row followed by a retract, and consider the issue done when that sequence no longer throws an NPE and matches the disk-backed behavior.
Written by the indexing model from the issue text.
Description
Search before asking
- I searched in the issues and found no similar issues.
Paimon version
master (1.5-SNAPSHOT)
Compute Engine
Flink (secondary-index lookup join with lookup.cache = MEMORY).
Minimal reproduce step
- Run a lookup join whose join key is not the table's primary key (a secondary-index lookup), with
lookup.cache = MEMORYand a lookup filter (predicate). - Feed a changelog where a row that does not pass the predicate is later deleted (a
-D/-Ufor that key).
What doesn't meet your expectations?
The lookup refresh crashes with a NullPointerException. SecondaryIndexLookupTable.refreshRow only adds a row to the index state when the predicate passes (on +I / +U), but retracts unconditionally on -D / -U. So a row that was filtered out was never added, and its later retract reaches InMemorySetState.retract, which does values.get(secKey).remove(...) with no null check and throws. The disk-backed sibling LocalKvSetState.retract already treats an absent key as a no-op, so the same join crashes only in MEMORY cache mode.
Anything else?
This is a behavior inconsistency between the two SetState implementations; MEMORY mode should tolerate the absent-key retract like the disk-backed one.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Dominant language
- Java
- Stars
- 3.4k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 502
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/paimon
-
REST Catalog alterTable silently reports success when the server returns a non-table/column 404Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
P2 testing
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
area/core kind/bug status/triage team/core-shared
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
checkstyle/checkstyle#21755 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spring-projects/spring-integration#11495 ·
Maintainers usually reply within 2 days
-
Issue: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
OpenAPITools/openapi-generator#25021 ·
Maintainers usually reply within 1 day