File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1030,12 +1030,6 @@ func (r *RedisServer) get(conn redcon.Conn, cmd redcon.Command) {
10301030
10311031// isLeaderKeyExpired checks whether the key has an expired TTL on the leader.
10321032func (r * RedisServer ) isLeaderKeyExpired (key []byte ) bool {
1033- if expireAt , found := r .ttlBuffer .Get (key ); found {
1034- if expireAt == nil {
1035- return false
1036- }
1037- return ! expireAt .After (time .Now ())
1038- }
10391033 raw , err := r .tryLeaderGetAt (redisTTLKey (key ), 0 )
10401034 if err != nil {
10411035 return false
@@ -1052,11 +1046,7 @@ func (r *RedisServer) isLeaderKeyExpired(key []byte) bool {
10521046// key has an expired TTL.
10531047func (r * RedisServer ) tryLeaderNonStringExists (key []byte ) bool {
10541048 // Check TTL first: if expired, the key is logically gone.
1055- if expireAt , found := r .ttlBuffer .Get (key ); found {
1056- if expireAt != nil && ! expireAt .After (time .Now ()) {
1057- return false
1058- }
1059- } else if raw , err := r .tryLeaderGetAt (redisTTLKey (key ), 0 ); err == nil {
1049+ if raw , err := r .tryLeaderGetAt (redisTTLKey (key ), 0 ); err == nil {
10601050 if ttl , decErr := decodeRedisTTL (raw ); decErr == nil && ! ttl .After (time .Now ()) {
10611051 return false
10621052 }
Original file line number Diff line number Diff line change @@ -21,8 +21,9 @@ const (
2121 // (EVAL / EVALSHA). Lua scripts under high load cause write conflicts in the Raft
2222 // layer, and each conflict triggers a full script re-execution. Capping the
2323 // concurrency reduces contention so individual scripts complete within
24- // SecondaryTimeout. Excess scripts are dropped (acceptable in dual-write mode
25- // where Redis remains the authoritative store).
24+ // SecondaryTimeout. Excess secondary script writes may be dropped to keep
25+ // contention bounded; this is only tolerable in modes where the script write
26+ // is targeting the non-authoritative backend.
2627 maxScriptWriteGoroutines = 64
2728)
2829
You can’t perform that action at this time.
0 commit comments