Repository navigation
feat: add support for push/pull/kill segments in google cloud deep storage without zip compression - #20382
Conversation
…orage without zip compression
|
Two things that I would like to ask for clarification: In this PR(and other object storage like deep storage), the new property Secondly, do you have any data that shows the segment size without compression as index.zip in the deep storage? |
There was a problem hiding this comment.
🟡 Changes recommended
Uploading an unzipped segment directly into its final GCS prefix makes replacement observable before all files are present. A concurrent reload or same-path rewrite can therefore materialize a mixed segment, so this should be addressed before enabling the new layout.
Reviewed 9 of 9 changed files; finding in 1 file.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 1 |
| P2 | 0 |
| P3 | 0 |
| Total | 1 |
Findings that could not be attached inline:
-
extensions-core/google-extensions/src/main/java/org/apache/druid/storage/google/GoogleDataSegmentPusher.java:174 - [P1] Unzipped replacement is not atomic
Finding: When druid.storage.zip=false, pushNoZip uploads each file directly under the final segment prefix and only then lists and deletes stale objects. If a historical or another pusher reads the same path during a retry or same-path rewrite, it can observe missing new files, old chunks, or a mixture of two segment versions; the puller can then materialize a corrupt or incomplete segment even though the push later succeeds.
Suggestion: Stage the complete file set under an isolated generation and publish it through an atomic marker or path switch, or otherwise prevent readers from seeing the prefix until upload and cleanup are complete.
This is an automated review by Codex GPT-5.6-Luna(max)
After addressing the findings or replying to the comments, you can request another review from me to trigger a new automated review.
My stance is that it would make sense to add In terms of compression/encoding, going forward I am much more interested in ways to shrink the internal files stored inside the v10 segment file so that we can preserve the ability to do partial reads, so I'll be spending any time/energy I have to pursue that instead of expanding the types of generic compression we can apply to the whole container
I don't have any hard data on this, in part because it doesn't matter because of the need to be able to do partial reads and I haven't had much time to do analysis of what we could improve inside the segment (because external compression is basically not an option and size hasn't proven problematic yet). 11GiB is quite a lot larger than most of the segments we deal with, I'm still fairly interested in the composition of the segment in that example to find opportunities to compress the internal files (i theorized at the time in that PR that perhaps a lot of uncompressed complex types were making the difference between compressed and uncompressed so different). |
I don't think this is really a problem, is it? Historicals won't ever be pulling a segment that didn't publish successfully (load spec doesn't exist in metadata until pushes all suceed), ingest time replicas I don't believe will publish at the same time (and they should be producing identical contents), and the only real replace case I'm aware of where content could be different is like when streaming failed to publish and has to retry and while starting at the same offsets, might end at different offsets, but that runs with useUniquePath=true so avoid the problem. |
You're right. Sometimes AI does not correctly understand the business flow. |
I agree with you that as you're putting effort on the new segment file format, the new compression does not make sense, we also don't have any plan/interest to push these forward. |
I re-read my last comment and it maybe came across a bit stronger than I intended 😅 , I'm certainly not opposed to wiring up those formats, and i think its probably fine if we deprecate |
| throw e; | ||
| } | ||
| catch (Exception e) { | ||
| throw new SegmentLoadingException( |
There was a problem hiding this comment.
feels like an odd exception type for a failed delete, but I see there is precedent for using it like this in S3DataSegmentKiller so I will not object outright
Description
Follow-up to #20327 to do the same thing for google cloud storage.