mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-05 16:15:56 +00:00
bug in add logic
This commit is contained in:
parent
d7be05b216
commit
5e3d5d5759
1 changed files with 9 additions and 3 deletions
12
core/topn.go
12
core/topn.go
|
|
@ -1,6 +1,7 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
"encoding/gob"
|
||||
"log"
|
||||
"pilosa/db"
|
||||
"pilosa/index"
|
||||
|
|
@ -47,7 +48,7 @@ func missing(fids map[util.SUUID]struct{}, all map[util.SUUID]struct {
|
|||
|
||||
for k, v := range all {
|
||||
_, ok := fids[k]
|
||||
if ok {
|
||||
if !ok {
|
||||
results = append(results, hole{v.process, v.handle, k})
|
||||
}
|
||||
}
|
||||
|
|
@ -63,8 +64,9 @@ func newtask(p util.GUID) *Task {
|
|||
}
|
||||
|
||||
func (t *Task) Add(frag util.SUUID, bitmap_id uint64, handle index.BitmapHandle) {
|
||||
spew.Dump(t)
|
||||
fa, ok := t.f[frag]
|
||||
if ok {
|
||||
if !ok {
|
||||
fa = index.FillArgs{frag, handle, make([]uint64, 0, 0)}
|
||||
}
|
||||
fa.Bitmaps = append(fa.Bitmaps, bitmap_id)
|
||||
|
|
@ -85,7 +87,7 @@ func BuildTask(merge_map map[uint64]uint64,
|
|||
//id slice ==> SUUID,BitmapHandle
|
||||
for _, p := range missing(reporting_fragments, total_fragments) {
|
||||
task, ok := tasks[p.process]
|
||||
if ok {
|
||||
if !ok {
|
||||
task = newtask(p.process)
|
||||
tasks[p.process] = task
|
||||
}
|
||||
|
|
@ -151,6 +153,10 @@ type TopNPackage struct {
|
|||
HBitmap index.BitmapHandle
|
||||
}
|
||||
|
||||
func init() {
|
||||
gob.Register(TopNPackage{})
|
||||
}
|
||||
|
||||
func (self *Service) TopNQueryStepHandler(msg *db.Message) {
|
||||
//spew.Dump("TOP-N QUERYSTEP")
|
||||
qs := msg.Data.(query.TopNQueryStep)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue