xiangfu0 commented on code in PR #18680:
URL: https://github.com/apache/pinot/pull/18680#discussion_r3367286565
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/inv/json/BaseJsonIndexCreator.java:
##########
@@ -180,45 +206,148 @@ void addToPostingList(String value) {
*/
void generateIndexFile()
throws IOException {
+ boolean hasDirectDocIdIndex = generateDirectDocIdIndexFiles();
ByteBuffer headerBuffer = ByteBuffer.allocate(HEADER_LENGTH);
- headerBuffer.putInt(VERSION_2);
+ boolean omitDocIdMapping = _docIdMappingIdentity;
+ headerBuffer.putInt(omitDocIdMapping ? VERSION_3 : VERSION_2);
Review Comment:
This writes a brand-new on-disk JSON index version. Older Pinot servers only
accept VERSION_1/VERSION_2, so any segment built with VERSION_3 will fail to
load during a rolling upgrade or when older servers consume newly-pushed
segments. The V2 sidecar is backward-compatible because old readers ignore
trailing bytes; this version bump is not. Please keep writing VERSION_2 (with
the optional sidecar/zero-length marker) unless the rollout is gated on every
reader in the cluster understanding VERSION_3.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]