Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Not A Problem
-
None
-
None
-
None
-
None
-
I misunderstood what the "max versions" meant
Description
Step 1: put a cell
Step 2: delete the cell
Step 3: Scan#setRaw(true).setMaxVersions(0)
Step 4: Result result = table.getScanner(scan).next()
Step 5: The result will contain a Cell of DELETE type
Is it a correct result ? The critical code is shown below:
ScanWildcardColumnTracker.java
// May be we should check the verion first private MatchCode checkVersion(byte type, long timestamp) { if (!CellUtil.isDelete(type)) { currentCount++; } if (currentCount > maxVersions) { return ScanQueryMatcher.MatchCode.SEEK_NEXT_COL; // skip to next col } // keep the KV if required by minversions or it is not expired, yet if (currentCount <= minVersions || !isExpired(timestamp)) { setTSAndType(timestamp, type); return ScanQueryMatcher.MatchCode.INCLUDE; } else { return MatchCode.SEEK_NEXT_COL; } }
Comments?
Thanks