| 716 | } |
| 717 | |
| 718 | int checkAlreadyExpired(long long when) { |
| 719 | /* EXPIRE with negative TTL, or EXPIREAT with a timestamp into the past |
| 720 | * should never be executed as a DEL when load the AOF or in the context |
| 721 | * of a slave instance. |
| 722 | * |
| 723 | * Instead we add the already expired key to the database with expire time |
| 724 | * (possibly in the past) and wait for an explicit DEL from the master. */ |
| 725 | return (when <= mstime() && !g_pserver->loading && (!listLength(g_pserver->masters) || g_pserver->fActiveReplica)); |
| 726 | } |
| 727 | |
| 728 | /*----------------------------------------------------------------------------- |
| 729 | * Expires Commands |
no test coverage detected