Browse Source

Proper precedence when calculating time_to_evict (#18444)

Stelios Fragkakis 6 months ago
parent
commit
e28a66f4a5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/database/engine/datafile.c

+ 1 - 1
src/database/engine/datafile.c

@@ -108,7 +108,7 @@ bool datafile_acquire_for_deletion(struct rrdengine_datafile *df, bool is_shutdo
 
                 if(!df->users.time_to_evict) {
                     // first time we did the above
-                    df->users.time_to_evict = now_s + is_shutdown ? DATAFILE_DELETE_TIMEOUT_SHORT : DATAFILE_DELETE_TIMEOUT_LONG;
+                    df->users.time_to_evict = now_s + (is_shutdown ? DATAFILE_DELETE_TIMEOUT_SHORT : DATAFILE_DELETE_TIMEOUT_LONG);
                     internal_error(true, "DBENGINE: datafile %u of tier %d is not used by any open cache pages, "
                                          "but it has %u lockers (oc:%u, pd:%u), "
                                          "%zu clean and %zu hot open cache pages "