tarun11Mavani opened a new pull request, #20284: URL: https://github.com/apache/pinot/pull/20284
Follow-up to #19776, addressing the second of the two remaining cases in https://github.com/apache/pinot/pull/19776#issuecomment-6932937652 ## Problem `ZKOperator.invalidateStaleMetadataTar` skipped invalidation for a METADATA push whenever the source sidecar path equaled the final sidecar path. Matching paths do not show that the sidecar describes the incoming build. With `preferMetadataTarGz=false` and `copyToDeepStoreForMetadataPush=true`, the request metadata is extracted from the tar, so an old `seg.metadata.tar.gz` next to a replaced `seg.tar.gz` survived the refresh. A later push with the default preference then read its stale CRC and document counts, and deletion preservation archived a mismatched pair. ## Fix Delete the old sidecar on every refresh and drop the exemption. The now-unused `uploadType` and `sourceDownloadURIStr` parameters of the private method are removed. ## Behavior change A job that stages a tar and a correct sidecar in the deep-store table directory now loses that sidecar on refresh, matching SEGMENT-mode refresh, which already deletes it. Later metadata pushes for that segment extract metadata from the tar (a full download on non-local filesystems) and there is no sidecar to archive. I found no in-repo runner, example or doc that stages output this way, only one test; I can't see external setups. A client-side signal for "sidecar was used" would be the precise fix if this matters. ## Tests `ZKOperatorTest`: the old "keeps the sidecar generated by the same job" test is replaced by a regression that stages an old sidecar and a changed tar in one directory and supplies fresh request metadata, then asserts the sidecar is deleted and the final segment holds the changed bytes. It fails before the fix and passes after; the 6 tests in the class pass. Unit tests only. -- 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]
