remove ttl from collections

This commit is contained in:
chrislu
2025-07-01 21:01:49 -07:00
parent 757c436a82
commit 471910736d
4 changed files with 64 additions and 112 deletions

View File

@@ -147,7 +147,6 @@ type CollectionInfo struct {
VolumeCount int `json:"volume_count"`
FileCount int64 `json:"file_count"`
TotalSize int64 `json:"total_size"`
TTL string `json:"ttl"`
DiskTypes []string `json:"disk_types"`
Status string `json:"status"`
}
@@ -912,14 +911,6 @@ func (s *AdminServer) GetClusterCollections() (*ClusterCollectionsData, error) {
totalFiles += int64(volInfo.FileCount)
totalSize += int64(volInfo.Size)
} else {
// Format TTL properly
var ttlStr string
if volInfo.Ttl > 0 {
ttlStr = fmt.Sprintf("%ds", volInfo.Ttl)
} else {
ttlStr = ""
}
newCollection := CollectionInfo{
Name: collectionName,
DataCenter: dc.Id,
@@ -927,7 +918,6 @@ func (s *AdminServer) GetClusterCollections() (*ClusterCollectionsData, error) {
VolumeCount: 1,
FileCount: int64(volInfo.FileCount),
TotalSize: int64(volInfo.Size),
TTL: ttlStr,
DiskTypes: []string{diskType},
Status: "active",
}