This is an automated email from the ASF dual-hosted git repository.

hgruszecki pushed a commit to branch messages-cleaner
in repository https://gitbox.apache.org/repos/asf/iggy.git

commit 77e667687156fec5b2b8f5644fe65ff4af025a3c
Author: Hubert Gruszecki <[email protected]>
AuthorDate: Wed Jan 28 09:59:16 2026 +0100

    delete legacy timeindex references
---
 core/server/src/bootstrap.rs                            | 8 +-------
 core/server/src/shard/tasks/periodic/message_cleaner.rs | 8 --------
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/core/server/src/bootstrap.rs b/core/server/src/bootstrap.rs
index 12174ed4b..03f4dbb41 100644
--- a/core/server/src/bootstrap.rs
+++ b/core/server/src/bootstrap.rs
@@ -250,7 +250,6 @@ pub async fn load_segments(
 
         let messages_file_path = format!("{}/{}.{}", partition_path, 
log_file_name, LOG_EXTENSION);
         let index_file_path = format!("{}/{}.{}", partition_path, 
log_file_name, INDEX_EXTENSION);
-        let time_index_path = index_file_path.replace(INDEX_EXTENSION, 
"timeindex");
 
         async fn try_exists(path: &str) -> Result<bool, std::io::Error> {
             match compio::fs::metadata(path).await {
@@ -263,13 +262,12 @@ pub async fn load_segments(
         }
 
         let index_path_exists = try_exists(&index_file_path).await.unwrap();
-        let time_index_path_exists = 
try_exists(&time_index_path).await.unwrap();
         let index_cache_enabled = matches!(
             config.segment.cache_indexes,
             CacheIndexesConfig::All | CacheIndexesConfig::OpenSegment
         );
 
-        if index_cache_enabled && (!index_path_exists || 
time_index_path_exists) {
+        if index_cache_enabled && !index_path_exists {
             warn!(
                 "Index at path {} does not exist, rebuilding it based on 
{}...",
                 index_file_path, messages_file_path
@@ -293,10 +291,6 @@ pub async fn load_segments(
             );
         }
 
-        if time_index_path_exists {
-            compio::fs::remove_file(&time_index_path).await.unwrap();
-        }
-
         let messages_metadata = compio::fs::metadata(&messages_file_path)
             .await
             .map_err(|_| IggyError::CannotReadPartitions)?;
diff --git a/core/server/src/shard/tasks/periodic/message_cleaner.rs 
b/core/server/src/shard/tasks/periodic/message_cleaner.rs
index 62a0a7a24..6216c03b4 100644
--- a/core/server/src/shard/tasks/periodic/message_cleaner.rs
+++ b/core/server/src/shard/tasks/periodic/message_cleaner.rs
@@ -362,14 +362,6 @@ async fn delete_segments(
             } else {
                 trace!("Deleted index file: {}", path);
             }
-
-            let time_index_path = path.replace(".index", ".timeindex");
-            if let Err(e) = compio::fs::remove_file(&time_index_path).await {
-                trace!(
-                    "Could not delete time index file {}: {}",
-                    time_index_path, e
-                );
-            }
         } else {
             warn!(
                 "Index writer path not found for segment starting at offset 
{}",

Reply via email to