jinyongchoi commented on code in PR #15495:
URL: https://github.com/apache/kafka/pull/15495#discussion_r1527474042


##########
docs/streams/developer-guide/memory-mgmt.html:
##########
@@ -151,6 +151,10 @@
     Serdes.Long())
   .withCachingEnabled();</code></pre>
       <p>Record caches are not supported for <a class="reference internal" 
href="processor-api.html#streams-developer-guide-state-store-versioned"><span 
class="std std-ref">versioned state stores</span></a>.</p>
+      <p><strong>Caution:</strong> When using <code class="docutils 
literal"><span class="pre">withCachingEnabled()</span></code>,
+        if you <code class="docutils literal"><span 
class="pre">delete()</span></code> a key from the Store while iterating(e.g., 
<code class="docutils literal"><span 
class="pre">KeyValueIterator</span></code>) through the keys,
+        the value of the key that hasn't been flushed from the cache may be 
returned as a stale value.
+        Therefore, when deleting, you must <code class="docutils 
literal"><span class="pre">flush()</span></code> the cache before the 
iterator.</p>

Review Comment:
   @mjsax Could you verify the changes I fixed?
   
   ![memory-mgmt 
html](https://github.com/apache/kafka/assets/17429867/9d3aa1e4-258d-4e25-b438-0c4a6ccd9144)
   



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