b-slim commented on a change in pull request #944: [Hive-22760] Adding Clock 
based eviction strategy.
URL: https://github.com/apache/hive/pull/944#discussion_r396568465
 
 

 ##########
 File path: 
llap-server/src/java/org/apache/hadoop/hive/llap/cache/LlapAllocatorBuffer.java
 ##########
 @@ -80,9 +80,32 @@ int tryIncRef() {
     return incRefInternal(false);
   }
 
+  /**
+   *
+   */
+  @Override
+  public final void setClockBit() {
+    long val = state.get();
+    while (!State.isClockBitSet(val) && !state.compareAndSet(val, 
State.setClockBit(val))) {
+      val = state.get();
+    }
+  }
+  @Override
+  public final void unSetClockBit() {
 
 Review comment:
   did merge it let me know what you think.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to