mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
fixed lock
This commit is contained in:
parent
59234b9eb2
commit
11399dd8ea
3 changed files with 12 additions and 5 deletions
|
|
@ -13,8 +13,6 @@ import (
|
|||
"pilosa/index"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
func post(database, base_url, id, compressed_string, fragment_type string, slice int) {
|
||||
|
|
@ -24,7 +22,6 @@ func post(database, base_url, id, compressed_string, fragment_type string, slice
|
|||
values.Set("frame", fragment_type)
|
||||
values.Set("slice", fmt.Sprintf("%d", slice))
|
||||
values.Set("bitmap", compressed_string)
|
||||
spew.Dump(values)
|
||||
r, err := http.PostForm(base_url, values)
|
||||
if err != nil {
|
||||
log.Printf("error posting stat to stathat: %s", err)
|
||||
|
|
|
|||
|
|
@ -27,8 +27,10 @@ func init() {
|
|||
|
||||
func (self *FragmentContainer) LoadBitmap(frag_id SUUID, bitmap_id uint64, compressed_bitmap string) {
|
||||
if fragment, found := self.GetFragment(frag_id); found {
|
||||
loader := NewLoader(bitmap_id, compressed_bitmap)
|
||||
fragment.requestChan <- loader
|
||||
request := NewLoader(bitmap_id, compressed_bitmap)
|
||||
fragment.requestChan <- request
|
||||
request.Response()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -136,5 +136,13 @@ func TestFragment(t *testing.T) {
|
|||
res, _ := dummy.Clear(general)
|
||||
So(res, ShouldEqual, true)
|
||||
})
|
||||
Convey("store ", t, func() {
|
||||
b := uint64(1029)
|
||||
compressed := "H4sIAAAJbogA/2JmYRBQ+9/IzMjI6pxRmpfN+L+JgZGJkdk7tZKRjYGRNSwxpzSV8X8LAwOD8v9moDIup5z85GzHoqLESpAwI1AjWITxfxtQjdT/VqAIV7SxUWxpZl6JmQlImJGN0YGB4R+j+v8mJkaFH/8h4B+M8X+UgcwAhZTm/yZgMCLCarC4bbAxYGHFNBpWBBmwsGIeDSuCDFhYsYyGFUEGLKxYR8OKIAMWVmyjYUWQwcDwfyYwqNgHLKjk4Q7BBAAAAAD//wEAAP//QNipzzcJAAA="
|
||||
dummy.LoadBitmap(brand, b, compressed)
|
||||
bh1, _ := dummy.Get(brand, b)
|
||||
before, _ := dummy.Count(brand, bh1)
|
||||
So(15228, ShouldEqual, before)
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue