You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOOKUP carries original_partition_name but, unlike PUT_KV and PRODUCE_LOG, has neither a version bump nor a gate: ApiKeys.LOOKUP is still (1017, 0, 1, PUBLIC), validateVersionCompatibility has no LOOKUP branch, so the field is sent whatever version was negotiated.
The bump is the prerequisite for making this capability detectable, as discussed in #4001. The discussion in #3630 on LOOKUP expected an old server to return null; what happens instead is an NPE: dispatch is keyed on the echoed name, so an un-echoed response matches no in-flight batch and is dereferenced unchecked, failing the whole request as an UnknownServerException. Reproduced on main with a gateway stub that answers normally but does not echo the field:
org.apache.fluss.exception.UnknownServerException: java.lang.NullPointerException
at org.apache.fluss.client.lookup.LookupSender.handleLookupResponse(LookupSender.java:438)
at org.apache.fluss.client.lookup.LookupSender.lambda$sendLookupRequestAndHandleResponse$10(LookupSender.java:349)
...
Add HISTORICAL_LOOKUP_MIN_VERSION = 2 and a LOOKUP branch in validateVersionCompatibility using hasHistoricalLookup, throwing UnsupportedVersionException.
Since release-1.0 advertises the same LOOKUP maximum as 0.9, a bump that lands only on main would make the gate reject 1.0 servers that do support historical lookup, so it may be worth considering for release-1.0.
Search before asking
Description
Parent issue: #3631. Follow-up to #3632.
LOOKUPcarriesoriginal_partition_namebut, unlikePUT_KVandPRODUCE_LOG, has neither a version bump nor a gate:ApiKeys.LOOKUPis still(1017, 0, 1, PUBLIC),validateVersionCompatibilityhas noLOOKUPbranch, so the field is sent whatever version was negotiated.The bump is the prerequisite for making this capability detectable, as discussed in #4001. The discussion in #3630 on
LOOKUPexpected an old server to return null; what happens instead is an NPE: dispatch is keyed on the echoed name, so an un-echoed response matches no in-flight batch and is dereferenced unchecked, failing the whole request as anUnknownServerException. Reproduced onmainwith a gateway stub that answers normally but does not echo the field:Proposed change
ApiKeys.LOOKUPto2. The maximum is still1from [lake] Fix lake encoder causing prefix lookup to miss data when bucket key is a subset of primary key #2464, so1cannot be given that meaning retroactively; new/old then negotiates 1 and the gate fires. The only server-sideLOOKUPversion check,ReplicaManager#validateClientVersionForPkTable, is>= 1, so it is unaffected. The server must also keep acceptingoriginal_partition_nameat v1, since clients from [lookup] Support historical partition lookup for lake tables #3630 onward already send it there.HISTORICAL_LOOKUP_MIN_VERSION = 2and aLOOKUPbranch invalidateVersionCompatibilityusinghasHistoricalLookup, throwingUnsupportedVersionException.Since
release-1.0advertises the sameLOOKUPmaximum as0.9, a bump that lands only onmainwould make the gate reject 1.0 servers that do support historical lookup, so it may be worth considering forrelease-1.0.Willingness to contribute