Slackbot
06/26/2023, 10:46 AMJohn Kowtko
06/26/2023, 1:43 PMmaxRowsInMemory, maxBytesInMemory and intermediatePersistPeriod limit how much data can accumulate here before being "persisted" to local disk
b. Data from the row buffer is periodically compiled into a full segment format (columnar, dictionary encoded, compress) and stored as a "mini-segment" or what we call "intermediate persist", file, which is still located on local disk for the MM that is ingesting it. Many of these files will likely be created before building and publishing a "real" segment to deep storage. The data in phases 1 and 2 above are both considered as "real-time segments".
c. When the amount of data accumulated reaches a larger threshold (e.g. maxRowsPerSegment), all of the intermediate persist files will be compacted into a single "real" segment and pushed to deep storage. This process is generally called the "Handoff", transferring the segment from real-time to historical status.
2. Ingestion node failure.
a. If you have ingestion replicas set up they both operate in tandem, syncing to the same Kafka offsets, so when one replica dies the other one can continue on. If they are both operating without error then when the first replica finishes publishing a segment the second one is told to abort that segment, but both replicas would continue ingesting the next segment.
b. If you do not have ingestion replicas (i.e. only one task) then if it fails then at worst case it will have to go back to the Kafka offset related to the last published segment, and start over again from there. There may be an intermediate savepoint related to the intermediate persist files stored on the MM local disk, but I don't know enough about that part of the ingestion to say whether the recovery can pick up from that point ... someone else will have to chime in here š
3. Someone else will have to clarify this one too ... I don't know for sure what happens if the cluster loses contact with Deep Storage.
a. Ingestion -- if the ingestion tasks cannot publish a segment to deep storage I imagine you will see ingestion task failures resulting in Kafka lag and retries
b. Historicals have deep storage segments loaded onto their local disk, so I don't know if they can continue to service queries even if they cannot contact deep storage anymore.
Hoping someone else can fill in the gaps here.
Thanks. JohnDejan Zegarac
06/26/2023, 2:00 PMDejan Zegarac
06/26/2023, 2:11 PMJohn Kowtko
06/26/2023, 3:47 PM