aa-dit-yuh opened a new issue, #39842:
URL: https://github.com/apache/beam/issues/39842

   ### What happened?
   
   ### What happened?
   When reading from Cloud Bigtable using Apache Beam, reading is performed in 
buffered segments. When a segment hits memory limits or row limits during a 
read, Beam pauses the stream and calls `truncateRequest` to construct a new 
`ReadRowsRequest` for the remainder of the key range starting from 
`(start_key_open: lastKey)`.
   For key ranges where the open end key is the start key with an appended null 
byte (e.g., `[K, K\0)`, common in single-row scans, prefix scans, or dynamic 
work rebalancing splits), `EndPoint.compareTo` compares `"K\0"` to `"K"`, 
evaluating to `endCmp > 0`. Because `endCmp > 0`, `truncateRequest` did not 
skip the range after reading key `K`, and generated a request with 
`(start_key_open: K, end_key_open: K\0)`.
   Cloud Bigtable server validates `start_key_open` as `K\0` and strictly 
enforces `start_key < end_key`. Because `K\0 < K\0` is false, Bigtable server 
rejects the request with:
   
   ```
   io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Error in field 
'row_ranges' : Error in element #0 : start_key must be less than end_key
   ```
   
   ### Issue Severity
   Priority: 2 (intermittent pipeline failure under memory/buffer load)
   ### Affected Versions
   2.68.0, 2.69.0, 2.70.0, master
   ### Component
   Java SDK / `sdks/java/io/google-cloud-platform` (BigtableIO)
   
   
   ### Issue Priority
   
   Priority: 2 (default / most bugs should be filed as P2)
   
   ### Issue Components
   
   - [ ] Component: Python SDK
   - [ ] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [ ] Component: IO connector
   - [ ] Component: Beam YAML
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Infrastructure
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Prism Runner
   - [ ] Component: Twister2 Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


-- 
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]

Reply via email to