Skip to content

Commit

Permalink
chore: update the list of retryable gRPC functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nand4011 committed Dec 5, 2024
1 parent 17dbe45 commit 74ac0c8
Showing 1 changed file with 41 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,58 @@ public class DefaultRetryEligibilityStrategy implements RetryEligibilityStrategy
new HashSet<String>() {
{
add("cache_client.Scs/Get");
add("cache_client.Scs/GetBatch");
add("cache_client.Scs/Set");
add("cache_client.Scs/SetBatch");
// Not retryable: "cache_client.Scs/SetIf"
// SetIfNotExists is deprecated
// Not retryable: "cache_client.Scs/SetIfNotExists"
add("cache_client.Scs/Delete");
// not idempotent "/cache_client.Scs/Increment"
add("cache_client.Scs/DictionarySet");
// not idempotent: "/cache_client.Scs/DictionaryIncrement",
add("cache_client.Scs/KeysExist");
// Not retryable: "cache_client.Scs/Increment"
// Not retryable: "cache_client.Scs/UpdateTtl"
add("cache_client.Scs/ItemGetTtl");
add("cache_client.Scs/ItemGetType");

add("cache_client.Scs/DictionaryGet");
add("cache_client.Scs/DictionaryFetch");
add("cache_client.Scs/DictionarySet");
// Not retryable: "cache_client.Scs/DictionaryIncrement"
add("cache_client.Scs/DictionaryDelete");
// not idempotent: "/cache_client.Scs/SortedSetPut"
add("cache_client.Scs/DictionaryLength");

add("cache_client.Scs/SetFetch");
add("cache_client.Scs/SetSample");
add("cache_client.Scs/SetUnion");
add("cache_client.Scs/SetDifference");
add("cache_client.Scs/SetContains");
add("cache_client.Scs/SetLength");
// Not retryable: "cache_client.Scs/SetPop"

// Not retryable: "cache_client.Scs/ListPushFront"
// Not retryable: "cache_client.Scs/ListPushBack"
// Not retryable: "cache_client.Scs/ListPopFront"
// Not retryable: "cache_client.Scs/ListPopBack"
// Not used: "cache_client.Scs/ListErase"
add("cache_client.Scs/ListRemove");
add("cache_client.Scs/ListFetch");
add("cache_client.Scs/ListLength");
// Not retryable: "cache_client.Scs/ListConcatenateFront"
// Not retryable: "cache_client.Scs/ListConcatenateBack"
// Not retryable: "cache_client.Scs/ListRetain"

add("cache_client.Scs/SortedSetPut");
add("cache_client.Scs/SortedSetFetch");
add("cache_client.Scs/SortedSetGetScore");
// not idempotent: "/cache_client.Scs/SortedSetRemove"
add("cache_client.Scs/SortedSetRemove");
// Not retryable: "cache_client.Scs/SortedSetIncrement"
add("cache_client.Scs/SortedSetGetRank");
add("cache_client.Scs/SortedSetLength");
add("cache_client.Scs/SortedSetLengthByScore");
// not idempotent: "/cache_client.Scs/SortedSetIncrement"
// not idempotent: "/cache_client.Scs/SetUnion"
// not idempotent: "/cache_client.Scs/SetDifference"
add("cache_client.Scs/SetContains");
add("cache_client.Scs/SetFetch");
add("cache_client.Scs/SetLength");
// not idempotent: "/cache_client.Scs/SetIfNotExists"
// not idempotent: "/cache_client.Scs/ListPushFront",
// not idempotent: "/cache_client.Scs/ListPushBack",
// not idempotent: "/cache_client.Scs/ListPopFront",
// not idempotent: "/cache_client.Scs/ListPopBack"
add("cache_client.Scs/ListFetch");
// Warning: in the future, this may not be idempotent
// Currently it supports removing all occurrences of a value.
// In the future, we may also add "the first/last N occurrences of a value".
// In the latter case it is not idempotent.
add("cache_client.Scs/ListRemove");
add("cache_client.Scs/ListLength");
// not idempotent: "/cache_client.Scs/ListConcatenateFront",
// not idempotent: "/cache_client.Scs/ListConcatenateBack"
add("cache_client.Scs/GetBatch");

add("cache_client.pubsub.Pubsub/Subscribe");
}
};
};

/** {@inheritDoc} */
public boolean isEligibileForRetry(final Status status, final String methodName) {
Expand Down

0 comments on commit 74ac0c8

Please sign in to comment.