| 59 | }; |
| 60 | |
| 61 | bool canReplyWith(Error e) { |
| 62 | switch (e.code()) { |
| 63 | case error_code_encrypt_key_not_found: |
| 64 | // FDB <-> KMS connection may be observing transient issues |
| 65 | // Caller processes should consider reusing 'non-revocable' CipherKeys iff ONLY below error codes lead to CipherKey |
| 66 | // refresh failure |
| 67 | case error_code_timed_out: |
| 68 | case error_code_connection_failed: |
| 69 | return true; |
| 70 | default: |
| 71 | return false; |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | int64_t computeCipherRefreshTS(Optional<int64_t> refreshInterval, int64_t currTS) { |
| 76 | int64_t refreshAtTS = -1; |
no test coverage detected