mwkang commented on code in PR #6900:
URL: https://github.com/apache/hbase/pull/6900#discussion_r2051976496
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java:
##########
@@ -832,7 +845,7 @@ private void updateMetricsStore(boolean memstoreRead) {
* @return null is the top cell doesn't change. Otherwise, the NextState to
return
*/
private NextState needToReturn(List<? super ExtendedCell> outResult) {
- if (!outResult.isEmpty() && topChanged) {
+ if (topChanged) {
Review Comment:
You're right that at the `StoreScanner` level, the behavior doesn't seem
immediately problematic.
However, the issue becomes visible on the client side when multiple column
families are involved — the row ends up getting split.
This happens because the result from `row2` is included in the first next()
call, which is supposed to return only `row1`.
As a result, the client receives fragmented results for `row2`.
To help illustrate the issue, I’ve added a reproducible test case.
If you run
[TestTopChanged.testTopChanged](https://github.com/mwkang/hbase/blob/ad4a2558c46c1291f14b02c4fd1fa02603202c5d/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestTopChanged.java)
on the
[feature/bug-demo-HBASE-29254](https://github.com/mwkang/hbase/tree/feature/bug-demo-HBASE-29254)
branch, you can observe the behavior directly.
Here’s what you’ll see:
- **With the `!outResult.isEmpty()` condition in
[`needToReturn`](https://github.com/mwkang/hbase/blob/ad4a2558c46c1291f14b02c4fd1fa02603202c5d/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java#L865)
(current behavior):**
```
RESULT: rowkey = row2, cf = cf2
RESULT: rowkey = row2, cf = cf1
```
- **Without the `!outResult.isEmpty()` condition (modified behavior):**
```
RESULT: rowkey = row2, cf = cf1, cf2
```
It would be great if you could take a look — I know it's a bit of a hassle,
but your feedback would be really helpful.
--
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]