Skip to content

Commit

Permalink
Enlarge the cache used to avoid retry from internal-catalog towards H…
Browse files Browse the repository at this point in the history
…TS (#250)

## Summary

This change is identified as one of the action item from investigation
of a table corruption issue caused by retry towards House table service.

What we wanted to achieve here is, within a lifespan of a client-started
transaction on the server side(after taking all the retry possibility
into the consideration), all of the retry attempts will be intentionally
blocked from the internal catalog's perspective.

By running the audit log internally, we have seen ~50K put requests on
the table-service and that puts ~170 PUT request for every 5 minute
time-window. Counting in the future growth, we reach 1k as the cache
size.
  • Loading branch information
autumnust authored Nov 18, 2024
1 parent 071c2b0 commit 5368ea8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class OpenHouseInternalTableOperations extends BaseMetastoreTableOperatio
private static final Gson GSON = new Gson();

private static final Cache<String, Integer> CACHE =
CacheBuilder.newBuilder().expireAfterWrite(1, TimeUnit.MINUTES).maximumSize(100).build();
CacheBuilder.newBuilder().expireAfterWrite(5, TimeUnit.MINUTES).maximumSize(1000).build();

@Override
protected String tableName() {
Expand Down

0 comments on commit 5368ea8

Please sign in to comment.