bug with shadow correction

This commit is contained in:
Todd Gruben 2021-10-30 10:44:23 -05:00
parent bba60eb20d
commit 521ada8e70
3 changed files with 7 additions and 7 deletions

View file

@ -5378,7 +5378,7 @@ func TestFragmentConcurrentReadWrite(t *testing.T) {
ltx := idx.holder.txf.NewTx(Txo{Write: writable, Index: idx, Fragment: f, Shard: f.shard})
for i := uint64(0); i < 1000; i++ {
_, err := f.setBit(tx, i%4, i)
_, err := f.setBit(ltx, i%4, i)
if err != nil {
return errors.Wrap(err, "setting bit")
}
@ -5388,12 +5388,12 @@ func TestFragmentConcurrentReadWrite(t *testing.T) {
})
// need read-only Tx so as not to block on the writer finishing above.
tx = idx.holder.txf.NewTx(Txo{Write: !writable, Index: idx, Fragment: f, Shard: f.shard})
defer tx.Rollback()
tx1 := idx.holder.txf.NewTx(Txo{Write: !writable, Index: idx, Fragment: f, Shard: f.shard})
defer tx1.Rollback()
acc := uint64(0)
for i := uint64(0); i < 100; i++ {
r := f.mustRow(tx, i%4)
r := f.mustRow(tx1, i%4)
acc += r.Count()
}
if err := eg.Wait(); err != nil {

View file

@ -17,9 +17,9 @@ package pilosa_test
import (
"fmt"
"net"
"net/http"
"testing"
"net/http"
_ "net/http/pprof"
"github.com/molecula/featurebase/v2/testhook"

View file

@ -1104,8 +1104,8 @@ func TestHandler_Endpoints(t *testing.T) {
clus := test.MustRunCluster(t, 1, []server.CommandOption{test.OptAllowedOrigins([]string{"http://test/"})})
defer clus.Close()
w = httptest.NewRecorder()
h = clus.GetNode(0).Handler.(*http.Handler).Handler
h.ServeHTTP(w, req)
h1 := clus.GetNode(0).Handler.(*http.Handler).Handler
h1.ServeHTTP(w, req)
result = w.Result()
if result.StatusCode != 200 {