Skip to content

feat: add partition load state display and management#994

Open
MonkeyNull wants to merge 1 commit intozilliztech:mainfrom
MonkeyNull:feature/partition-state
Open

feat: add partition load state display and management#994
MonkeyNull wants to merge 1 commit intozilliztech:mainfrom
MonkeyNull:feature/partition-state

Conversation

@MonkeyNull
Copy link
Copy Markdown

🚀 Pull Request: Add Partition Load State Display and Management
📋 Description
This PR adds comprehensive partition load state management to Attu, enabling users to view and manage the loading status of partitions with real-time updates.

✨ Features Added
Backend Changes
Type Definitions: Added status and loadedPercentage fields to PartitionData type
Service Layer: Implemented getPartitionLoadState() method using Milvus getLoadState API
Error Handling: Robust error handling with graceful degradation
Frontend Changes
UI Component: Extended StatusAction component to support partition-level operations
New Dialogs:
LoadPartitionDialog: For loading partitions into memory
ReleasePartitionDialog: For releasing partitions from memory
Auto-refresh: Implemented 2-second interval polling for partitions in 'loading' state
Status Column: Added interactive status column in Partitions page showing:
✅ Loaded (green indicator)
🔄 Loading (with progress percentage)
⭕ Unloaded (ready to load)
🎯 User Benefits
Real-time Status: Users can see partition loading progress in real-time
Interactive Actions: One-click load/release operations directly from the status column
Better UX: Clear visual indicators for partition states
Consistency: Unified interface for both collection and partition management
🔧 Technical Details
Files Modified:

server/src/types/partitions.type.ts - Type definitions
server/src/partitions/partitions.service.ts - Service implementation
client/src/pages/databases/collections/StatusAction.tsx - Component extension
client/src/pages/databases/collections/partitions/Partitions.tsx - UI integration
Files Created:

client/src/pages/dialogs/LoadPartitionDialog.tsx - Load dialog
client/src/pages/dialogs/ReleasePartitionDialog.tsx - Release dialog
Compatibility:

Milvus 2.0+ (uses getLoadState API introduced in 2.0)
Tested with Milvus 2.4.x and 2.5.x
📸 Screenshots
image
image
image

✅ Checklist
Code follows project style guidelines
Self-review completed
No compilation errors
Compatible with supported Milvus versions
Commit message follows conventional commits format

- Add status and loadedPercentage fields to PartitionData type
- Implement getPartitionLoadState method in PartitionsService using Milvus getLoadState API
- Create LoadPartitionDialog and ReleasePartitionDialog components for partition operations
- Integrate StatusAction component with partition support in Partitions page
- Add auto-polling mechanism (2s interval) for loading partitions to update status in real-time
- Support both collection and partition level load/release operations through unified StatusAction

Technical details:
- Backend: Added getLoadState wrapper and getPartitionLoadState method with error handling
- Frontend: Extended StatusAction with partition prop and onRefresh callback
- UI: Added status column showing loaded/loading/unloaded states with interactive actions
- Compatibility: Works with Milvus 2.0+ (getLoadState API introduced in 2.0)

Closes: Partition state management feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant