This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch sidx/interface in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
commit afeed58d952490d9e9d00dac606ceb60b434748c Author: Gao Hongtao <hanahm...@gmail.com> AuthorDate: Tue Aug 19 09:20:11 2025 +0700 Update SIDX configuration options in `DESIGN.md` and `TODO.md` - Refactored the Options struct to include new fields: Path for index file storage, MergePolicy for segment merging strategy, and Protector for memory management. - Updated TODO list to reflect the addition of new configuration options, including path specification and resource management controls. --- banyand/internal/sidx/DESIGN.md | 21 ++++++--------------- banyand/internal/sidx/TODO.md | 7 +++---- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/banyand/internal/sidx/DESIGN.md b/banyand/internal/sidx/DESIGN.md index 22816e7a..04e2a62f 100644 --- a/banyand/internal/sidx/DESIGN.md +++ b/banyand/internal/sidx/DESIGN.md @@ -1864,21 +1864,12 @@ This consistency ensures that developers familiar with one module can easily und ### Configuration Options ```go type Options struct { - // Part configuration - MaxKeysPerPart int // Maximum keys in memory part - KeyRangeSize int64 // Target size of key ranges per part - - // Flush configuration - FlushTimeout time.Duration - FlushKeyThreshold int64 // Flush when key range exceeds this - - // Merge configuration - MergeMinParts int - MergeMaxParts int - - // Query configuration - DefaultOrder Order // Default ordering for queries - MaxQueryRange int64 // Maximum allowed query key range + // Path specifies the directory where index files will be stored + Path string + // MergePolicy defines the strategy for merging index segments during compaction + MergePolicy *MergePolicy + // Protector provides memory management and protection mechanisms + Protector protector.Memory } ``` diff --git a/banyand/internal/sidx/TODO.md b/banyand/internal/sidx/TODO.md index 6b1b45b8..f7019aee 100644 --- a/banyand/internal/sidx/TODO.md +++ b/banyand/internal/sidx/TODO.md @@ -133,14 +133,13 @@ This document tracks the implementation progress of the Secondary Index File Sys ### 2.4 Configuration Interfaces (`options.go`) - [ ] Define Options struct for SIDX configuration -- [ ] Add ResourceLimits for memory/disk management -- [ ] Add PerformanceOptions for tuning parameters -- [ ] Add MonitoringOptions for observability +- [ ] Add path where the files are put. +- [ ] Add protector.Memory to control the resource limit. +- [ ] Add *mergePolicy to control merge behaviour. - [ ] **Test Cases**: - [ ] Default configurations are sensible - [ ] Configuration validation works correctly - [ ] Options can be merged and overridden - - [ ] Performance tuning options are effective ### 2.5 Interface Documentation and Examples (`interfaces_examples.go`) - [ ] Create comprehensive interface usage examples