fix(master): selete one address tobe delete.#1000577106
fix(master): count the required mp replica. #1000577106
Restore the count define back to original.
fix(master): check commit in the raft status.#1000580439
Signed-off-by: Wu Huocheng <wuhuocheng@oppo.com>
The createStoreModeChangePlan is replaced with batchAddLearner.
So delete the unused code that is createStoreModeChangePlan.
Signed-off-by: Wu Huocheng <wuhuocheng@oppo.com>
- Add logging for peer removal actions in raft state machine
- Update addMetaReplica and addMetaReplicaLearner methods for logging
- Improve logging in partition FSM operations for member changes
- Enhance logging for learner mode recovery checks and actions
- Modify cluster balance logic to include additional parameters for learners
This commit improves the observability of raft operations and learner recovery processes.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Add learnerRecoverTimeoutSeconds parameter for cluster settings
- Update command line interface to accept learner recovery timeout
- Enhance API to parse and handle learnerRecoverTimeoutSeconds
- Modify cluster view to display learnerRecoverTimeoutSeconds status
- Implement logic to set learnerRecoverTimeoutSeconds in cluster
This commit enhances cluster management by allowing configuration of
the learner mode recovery timeout, improving the system's resilience
during decommissioning processes.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Introduce enableMpDecommissionByLearner flag for cluster settings
- Update command line interface to accept new parameter
- Enhance API to parse and handle enableMpDecommissionByLearner
- Modify cluster view to display enableMpDecommissionByLearner status
- Implement logic to set enableMpDecommissionByLearner in cluster
This commit enhances cluster management capabilities by allowing
configuration of the mp decommissioning behavior.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Remove preparePartitionCheckMultiVersion function and its logic
- Update calls to use getPartitionCheckProxyMultiVersion instead
- Simplify partition check handling in multiple operations
- Ensure consistent behavior across metadata manager methods
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Rename TestFreeList to TestFreeList_BasicOperations for clarity
- Add tests for edge cases including empty list and invalid inode
- Implement FIFO order tests to ensure correct item retrieval
- Add tests for removing items from different positions
- Introduce concurrent operations tests to validate thread safety
- Enhance mixed operations tests for comprehensive coverage
This commit significantly improves the test coverage for FreeList,
ensuring robustness against edge cases and concurrent operations within the CubeFS system.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Remove unused RWMutex from MetaNodeMetrics struct
- Rename TestMultipartExtend_Bytes to TestMUMultipartExtend_Bytes
- Add comprehensive unit tests for Multipart and Part structs
- Implement tests for edge cases and concurrent access scenarios
- Optimize buffer handling in multipart serialization methods
This commit enhances the performance and readability of the metanode
implementation, ensuring better resource management and test coverage.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Implement helper functions for creating and comparing dentries
- Add tests for marshaling and unmarshaling of dentry items
- Include tests for basic properties and string representation of dentries
- Implement tests for edge cases with long, special, and unicode names
- Add tests for handling empty and zero values in dentries
- Enhance performance benchmarks for dentry operations.
This commit significantly improves the test coverage for Dentry,
ensuring robustness and correctness in the CubeFS system.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Implement tests for NewQuotaManager initialization and properties
- Add marshal/unmarshal tests for MetaQuotaInode and TxMetaQuotaInode
- Include edge case tests for empty and large quota IDs
- Add concurrent access tests for quota manager methods
- Enhance tests for quota heartbeat info setting and retrieval
- Validate error handling for invalid data during unmarshal operations
This commit significantly improves the test coverage for the MetaQuotaManager,
ensuring robustness and correctness in the CubeFS system.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Rename buffer test functions for clarity and consistency
- Add tests for nil pointer handling in Put functions
- Implement buffer reuse tests to ensure proper reset behavior
- Add concurrent access tests for buffer pools
- Introduce tests for buffer capacity limits and various read operations
- Enhance binary serialization tests for sorted extents
This commit significantly improves the test coverage for buffer operations,
ensuring robustness and correctness in the CubeFS system.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Implement safe type assertions for sorted extents to prevent panics
- Increase buffer size in String method for improved performance
- Fix JSON formatting in String method for expiredTime field
- Refactor IsEmpty and Size methods for better readability
- Add comprehensive unit tests for SortedObjExtents, covering edge cases
- Improve concurrent access handling in tests for SortedObjExtents
This commit enhances the type safety and performance of the SortedObjExtents
implementation, ensuring robustness and correctness in the CubeFS system.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Rename existing test functions for clarity and consistency
- Add tests for edge cases including zero and large uniqids
- Implement concurrent access tests for legalIn method
- Introduce eviction logic tests for both recent and old operations
- Add tests for marshaling and unmarshaling edge cases
- Improve queue operation tests including scan, clone, and reset
This commit significantly enhances the test coverage for the uniqChecker,
ensuring robustness against edge cases and concurrent operations within the CubeFS system.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Implemented unit tests for DelExtFile methods including GetIdx, Len,
Swap, Less, and Sort.
- Created mockFileInfo type to simulate os.FileInfo for testing.
- Added test cases to validate behavior for valid and invalid file names.
- Ensured proper handling of sorting and filtering of file information.
This commit enhances test coverage for DelExtFile, ensuring the
correctness of its methods within the CubeFS system.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Changed the return type of Status method to simplify usage
- Added GetID and GetWalPath methods to the Partition interface
- Improved error handling in Delete method for better clarity
- Updated comments for methods to enhance understanding
- Simplified return statements in several methods for consistency
This commit refines the partition interface and its implementation,
improving code readability and maintainability within the CubeFS system.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Replaced map-based storage with sync.Map for zombie and noLeader durations
- Enhanced comments for better clarity and understanding of the code
- Simplified the logic for monitoring zombie peers and elections
- Improved error handling and logging for raft log directory creation
This commit refines the monitoring implementation and enhances code readability
within the CubeFS system.
Signed-off-by: Victor1319 <zengxuewei@oppo.com>
- Refactor handleFile to utilize cached inode info
- Implement batchGetFileInodeInfo for efficient inode retrieval
- Update ScanDentry struct to include HasInodeInfo and InodeInfo
- Modify handleDirLimitDepthFirst and handleDirLimitBreadthFirst to use batch processing
- Add BatchInodeGet method to MetaWrapper interface
Signed-off-by: Victor1319 <zengxuewei@oppo.com>