Fix id alloc backup invocation

This commit is contained in:
Ben Johnson 2021-05-06 11:44:55 -06:00
parent 7284c4dd10
commit 7e804d7d08
2 changed files with 5 additions and 0 deletions

View file

@ -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.

View file

@ -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)