pvary commented on code in PR #19115:
URL: https://github.com/apache/iceberg/pull/19115#discussion_r4706175033


##########
docs/docs/flink-queries.md:
##########
@@ -128,7 +128,9 @@ LEFT JOIN iceberg_catalog.db.user_dim /*+ 
OPTIONS('lookup.full-cache.reload-stra
   ON o.user_id = u.user_id;
 ```
 
-A reload reads the current snapshot of the dimension table and replaces the 
loaded cache atomically, so lookups observe either the previous cache or the 
new one, never a partially loaded cache. A reload that finds no new snapshot is 
a no-op, and the reload strategies also run once when the lookup function is 
opened, which is a no-op as well when the cache has not been loaded yet or the 
snapshot has not changed. Reloads run on the trigger's own thread while lookups 
keep being served from the previous cache, so they do not block the job; both 
caches are held in memory until the reload finishes, so peak memory is about 
twice the cache size. A reload never falls back to the previous cache: if a 
reload fails, the next lookup fails the job, so a stale cache is never served 
silently.
+A reload reads the current snapshot of the dimension table and replaces the 
loaded cache atomically, so lookups observe either the previous cache or the 
new one, never a partially loaded cache. A reload that finds no new snapshot is 
a no-op, and the reload strategies also run once when the lookup function is 
opened, which is a no-op as well when the cache has not been loaded yet or the 
snapshot has not changed. Reloads run on the trigger's own thread while lookups 
keep being served from the previous cache, so they do not block the job; both 
caches are held in memory until the reload finishes, so plan for twice the 
cache size in memory. A reload never falls back to the previous cache: if a 
reload fails, the next lookup fails the job, so a stale cache is never served 
silently.

Review Comment:
   Maybe this is even better:
   ```suggestion
   A full reload reads the current snapshot of the dimension table and replaces 
the loaded cache atomically, so lookups observe either the previous cache or 
the new one, never a partially loaded cache. A reload that finds no new 
snapshot is a no-op, and the reload strategies also run once when the lookup 
function is opened, which is a no-op as well when the cache has not been loaded 
yet or the snapshot has not changed. Reloads run on the trigger's own thread 
while lookups keep being served from the previous cache, so they do not block 
the job; both caches are held in memory until the reload finishes, so plan for 
twice the cache size in memory. A reload never falls back to the previous 
cache: if a reload fails, the next lookup fails the job, so a stale cache is 
never served silently.
   ```



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


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

Reply via email to