Skip to content

Commit

Permalink
update flush
Browse files Browse the repository at this point in the history
  • Loading branch information
wayblink committed Oct 9, 2022
1 parent 1acf6c7 commit d8cbe1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions core/backup_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,9 @@ func (b BackupContext) CreateBackup(ctx context.Context, request *backuppb.Creat
collSegmentsMap := make(map[string][]int64)
collSealTimeMap := make(map[string]int64)
for _, coll := range toBackupCollections {
segmentIDs, timeOfSeal, err := b.milvusClient.Flush(ctx, coll.Name, false)
collSegmentsMap[coll.Name] = segmentIDs
newSealedSegmentIDs, flushedSegmentIDs, timeOfSeal, err := b.milvusClient.Flush(ctx, coll.Name, false)
log.Info("flush segments", zap.Int64s("newSealedSegmentIDs", newSealedSegmentIDs), zap.Int64s("flushedSegmentIDs", flushedSegmentIDs))
collSegmentsMap[coll.Name] = append(newSealedSegmentIDs, flushedSegmentIDs...)
collSealTimeMap[coll.Name] = timeOfSeal
if err != nil {
log.Error(fmt.Sprintf("fail to flush the collection: %s", coll.Name))
Expand Down Expand Up @@ -538,7 +539,7 @@ func (b BackupContext) GetBackup(ctx context.Context, request *backuppb.GetBacku

backup, err := b.readBackup(ctx, request.GetBackupName())
if err != nil {
log.Error("Fail to read backup", zap.String("backupName", request.GetBackupName()), zap.Error(err))
log.Warn("Fail to read backup", zap.String("backupName", request.GetBackupName()), zap.Error(err))
resp.Status.Reason = err.Error()
return resp, nil
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ require (

replace (
github.com/apache/pulsar-client-go => github.com/milvus-io/pulsar-client-go v0.6.8
github.com/milvus-io/milvus-sdk-go/v2 => github.com/wayblink/milvus-sdk-go/v2 v2.2.1
github.com/milvus-io/milvus-sdk-go/v2 => github.com/wayblink/milvus-sdk-go/v2 v2.2.2
github.com/streamnative/pulsarctl => github.com/xiaofan-luan/pulsarctl v0.5.1
)

0 comments on commit d8cbe1b

Please sign in to comment.