virajjasani commented on a change in pull request #1818:
URL: https://github.com/apache/hbase/pull/1818#discussion_r433123320



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/Query.java
##########
@@ -164,7 +164,11 @@ public int getReplicaId() {
    * @param level IsolationLevel for this query
    */
   public Query setIsolationLevel(IsolationLevel level) {
-    setAttribute(ISOLATION_LEVEL, level.toBytes());
+    if (this instanceof ImmutableScan) {

Review comment:
       Because while constructing ImmutableScan(Scan), it calls parent 
Scan(Scan), which calls super.setIsolationLevel() and here, it calls 
setAttribute() which is overridden by ImmutableScan and hence, it will fail. I 
know this is not good check, but we do need to directly call 
`super.setAttribute()`, `this.setAttribute()` goes to ImmutableScan's 
`setAttribute()`.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to