文件操作 - compaction.h
返回文件管理
返回主菜单
删除本文件
文件: /usr/local/src/netdata/database/engine/metadata_log/compaction.h
编辑文件内容
// SPDX-License-Identifier: GPL-3.0-or-later #ifndef NETDATA_COMPACTION_H #define NETDATA_COMPACTION_H #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include "../rrdengine.h" struct logfile_compaction_state { unsigned fileno; /* Starts at 1 */ unsigned starting_fileno; /* 0 for normal files, staring number during compaction */ struct metadata_record_commit_log records_log; struct metadata_logfile_list new_metadata_logfiles; struct metadata_logfile *last_original_logfile; /* Marks the end of compaction */ uint8_t throttle; /* set non-zero to throttle compaction */ }; extern int compaction_failure_recovery(struct metalog_instance *ctx, struct metadata_logfile **metalogfiles, unsigned *matched_files); extern void metalog_do_compaction(struct metalog_worker_config *wc); extern void after_compact_old_records(struct metalog_worker_config* wc); #endif /* NETDATA_COMPACTION_H */
修改文件时间
将文件时间修改为当前时间的前一年
删除文件