diff --git a/ctl/backup.go b/ctl/backup.go index 403860656..d92316b2f 100644 --- a/ctl/backup.go +++ b/ctl/backup.go @@ -101,6 +101,8 @@ func (cmd *BackupCommand) Run(ctx context.Context) error { // Backup schema. if err := cmd.backupSchema(ctx, tw, schema); err != nil { return fmt.Errorf("cannot back up schema: %w", err) + } else if err := cmd.backupIDAllocData(ctx, tw); err != nil { + return fmt.Errorf("cannot back up id alloc data: %w", err) } // Backup data for each index. diff --git a/pilosa_internal_test.go b/pilosa_internal_test.go index aca9c6e92..3de8cfbbf 100644 --- a/pilosa_internal_test.go +++ b/pilosa_internal_test.go @@ -16,6 +16,7 @@ package pilosa import ( "bytes" + "io" "reflect" "testing" @@ -73,6 +74,8 @@ func (s *memAttrStore) BlockData(i uint64) (map[uint64]map[string]interface{}, e return nil, nil } +func (s *memAttrStore) WriteTo(w io.Writer) (int64, error) { return 0, nil } + func TestAPI_CombineForExistence(t *testing.T) { bm := roaring.NewBitmap(pos(1, 1), pos(1, 2), pos(1, 3), pos(1, 65537), pos(1, 65538), pos(2, 1), pos(2, 2), pos(2, 5), pos(2, 65537), pos(2, 65538)) buf := new(bytes.Buffer)