checksum All() instead of Count(All()) to cover index keys

This commit is contained in:
Matthew Jaffee 2021-12-06 10:36:20 -06:00
parent e45a26cc19
commit b8da3bc7e6
3 changed files with 3 additions and 5 deletions

View file

@ -808,7 +808,6 @@ func (c *Client) shardsMax() (map[string]uint64, error) {
}
// HTTPRequest sends an HTTP request to the Pilosa server (used by idk)
// nolint: deadcode
func (c *Client) HTTPRequest(method string, path string, data []byte, headers map[string]string) (status int, body []byte, err error) {
span := c.tracer.StartSpan("Client.HTTPRequest")

View file

@ -286,7 +286,6 @@ func (cmd *BackupCommand) backupShardNode(ctx context.Context, indexName string,
func (cmd *BackupCommand) backupIndexTranslateData(ctx context.Context, name string) error {
partitionN := topology.DefaultPartitionN
// Back up all bitmap data for the index.
ch := make(chan int, partitionN)
for partitionID := 0; partitionID < partitionN; partitionID++ {
ch <- partitionID

View file

@ -8,7 +8,7 @@ import (
"io"
"github.com/cespare/xxhash"
"github.com/molecula/featurebase/v2"
pilosa "github.com/molecula/featurebase/v2"
"github.com/molecula/featurebase/v2/server"
)
@ -61,12 +61,12 @@ func (cmd *ChkSumCommand) Run(ctx context.Context) (err error) {
h := xxhash.New()
for _, ii := range schema.Indexes {
qa := &pilosa.QueryRequest{Index: ii.Name, Query: "Count(All())"}
qa := &pilosa.QueryRequest{Index: ii.Name, Query: "All()"}
rs, err := client.Query(ctx, ii.Name, qa)
if err != nil {
return err
}
all := rs.Results[0].(uint64)
all := rs.Results[0]
as := fmt.Sprintf("all=%v", all)
_, _ = h.Write([]byte(as))