[Bug]: SpannerIO Change Streams may skip ChildPartitionsRecord when advancing tracker to artificial query end timestamp
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- google-cloud, java
- Ambito
- backend, databases, stream-processing
Direzione di ricerca
The issue is in QueryChangeStreamAction.java around line 360. Start by understanding the restriction tracker and how it claims timestamps. Look at the logic for unbounded queries when stopAfterQuerySucceeds is false. The fix is to avoid advancing the tracker to the artificial changeStreamQueryEndTimestamp and instead leave it at the last claimed position. Run tests related to Spanner Change Streams to verify the fix doesn't break existing behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened?
When reading from an unbounded Spanner Change Stream (or a Mutable Change Stream with a capped query end timestamp), QueryChangeStreamAction issues change stream queries with an artificial changeStreamQueryEndTimestamp (now + 2 minutes).
Previously, when the query completed and needed to resume (!stopAfterQuerySucceeds), QueryChangeStreamAction called tracker.tryClaim(changeStreamQueryEndTimestamp) before returning ProcessContinuation.resume():
In a very rare timing corner case where a change stream query finishes without returning the ChildPartitionsRecord at the end of a partition's range, claiming changeStreamQueryEndTimestamp can advance the restriction tracker past the partition's actual end timestamp. On the next continuation, the query resumes from changeStreamQueryEndTimestamp + 1ns, which falls outside the partition's valid timestamp range and returns an out-of-range start_timestamp error, causing QueryChangeStreamAction to mark the partition FINISHED before scheduling its child partitions.
Workaround & Scope
This is a client-side workaround in Apache Beam for this rare edge case while a fix is being implemented on the Spanner server side:
- Unbounded queries: When
!stopAfterQuerySucceeds, leaving the restriction tracker at the last claimed position (from the last processed data or heartbeat record) instead of advancing tochangeStreamQueryEndTimestampensures the subsequent query resumes fromlastClaimedTimestamp + 1nsand reads any remaining records (includingChildPartitionsRecord) before the partition ends. This workaround addresses the issue for unbounded queries. - Bounded queries: For bounded queries where
changeStreamQueryEndTimestampreachesendTimestamp(stopAfterQuerySucceeds == true), this client-side workaround does not apply and will be addressed by the Spanner server-side fix.
Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Issue Components
- Component: Java SDK
- Component: IO Connectors
- Lingua principale
- Java
- Stelle
- 8.7k
- Fork
- 4.7k
- Merge medio
- 2g 8h
- PR unite (30g)
- 246
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/beam
-
[Bug]: Row.toString throws for an ITERABLE field that is not backed by a ListForse già presa @PDGGK l’ha presa 56 giorni fa. Apertajava P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/beam#39624 · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
[Failing Test]: JmsIOTest. testCheckpointMark flakyForse già presa @mxtymoshyk l’ha presa 14 giorni fa. Apertabug failing test flake P2 pinned tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/beam#30225 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: PubsubIO used in batch incorrect batch cutoff sizeForse già presa @1fanwang l’ha presa 45 giorni fa. Apertabug io P3 pinned pubsub
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/beam#28011 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
build P3 sub-task
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
floci-io/floci#5369 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
sqlcipher/sqlcipher-android#97 · 1 commento ·
-
bug IIIF interoperability
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Netcracker/qubership-integration-platform#1046 ·
I maintainer di solito rispondono entro 2 giorni