[Bug]: SpannerIO Change Streams may skip ChildPartitionsRecord when advancing tracker to artificial query end timestamp
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- google-cloud, java
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Java
- スター
- 8.7k
- フォーク
- 4.7k
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 253
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/beam のほかの issue
-
[Bug]: Row.toString throws for an ITERABLE field that is not backed by a List対応中かも @PDGGK が 60 日前に担当しました。 オープンjava P3
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/beam#39624 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: PubsubIO used in batch incorrect batch cutoff size対応中かも @1fanwang が 49 日前に担当しました。 オープンbug io P3 pinned pubsub
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/beam#28011 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
build P3 sub-task
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
bug gcp io java P3
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
wildfly/wildfly-launcher#99 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
traccar/traccar#6076 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Flight SQL JDBC parses boolean properties case-sensitively, silently disabling TLS for useEncryption=TRUE対応中かも @Arawoof06 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
apache/arrow-java#1357 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Demo alert imports accept empty and oversized rule documents対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
apache/rocketmq-dashboard#6610 ·
メンテナーはふだん 3 日以内に返信