Merge branch 'master' into cicd-smoketest

This commit is contained in:
pokeeffe-molecula 2022-01-11 11:37:23 -06:00 committed by GitHub
commit 562d665014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 2 additions and 18 deletions

View file

@ -1077,7 +1077,7 @@ func (o *Operation) EncodeJSON(dst *jsonBuffer, codec *JSONCodec) (err error) {
// or a different id
for j = idx; j < len(op.RecordIDs) && op.RecordIDs[j] == id; j++ {
}
// fmt.Printf("field %s encoding %d-%d (v %d, s %d, k %d)\n",
// field, idx, j, len(op.Values), len(op.Signed), len(fieldKeys[i]))
// print this one, and advance this index to next position
dst.EncodeString(field)

View file

@ -118,8 +118,6 @@ func TestClusterStuff(t *testing.T) {
t.Fatalf("waiting on backup to finish: %v", err)
}
fmt.Println("STARTING RESTORE")
client := http.Client{}
if req, err := http.NewRequest(http.MethodDelete, "http://pilosa1:10101/index/testidx", nil); err != nil {
t.Fatalf("getting req: %v", err)

View file

@ -358,7 +358,6 @@ func (db *DB) checkpoint() (err error) {
}
}
// fmt.Printf("checkpoint: walPageN %d, PageMap size %d\n", db.walPageN, db.pageMap.size)
for pgno, walID := range pages {
page, err = db.readWALPageAt(walID)
if err != nil {
@ -698,10 +697,8 @@ func (db *DB) afterCurrentTx(callback func()) {
db.txWaiters = append(db.txWaiters, txw)
go func() {
<-txw.ready
// fmt.Printf("afterCurrentTx: locking db\n")
db.mu.Lock()
defer db.mu.Unlock()
// fmt.Printf("afterCurrentTx: running callback\n")
txw.callback()
}()
return
@ -759,11 +756,9 @@ func (db *DB) removeTx(tx *Tx) error {
// because every existing transaction could want to look up pages
// which are in the database before our operations, but which should
// now be in the WAL. We want them to use the WAL instead.
// fmt.Printf("possibly-async checkpoint...\n")
db.afterCurrentTx(func() {
// We still hold db.rwmu here. checkpoint unlocks it when it's
// ready.
// fmt.Printf("checkpoint starting\n")
if err := db.checkpoint(); err != nil {
db.logger.Errorf("async checkpoint: %v", err)
}

View file

@ -1122,7 +1122,6 @@ func (tx *Tx) deallocateTree(pgno uint32) error {
func (tx *Tx) readPage(pgno uint32) (_ []byte, isHeap bool, err error) {
// Meta page is always cached on the transaction.
//fmt.Printf("readPage %d\n", pgno)
if pgno == 0 {
return tx.meta[:], false, nil
}

View file

@ -42,7 +42,7 @@ func (b *Bitmap) AsContainerMatrixString() (r string) {
const rowWidthInContainerCount = 1 << (shardwidth.Exponent - 16) // - 16 because roaring.Container always holds 2^16 bits.
sw := uint64(1 << shardwidth.Exponent)
//fmt.Printf("sw = %v, shardwidth.Exponent = %v, rowWidthInContainerCount=%v\n", sw, shardwidth.Exponent, rowWidthInContainerCount)
maxrow := uint64(math.Ceil(float64(max) / float64(sw)))
if max == 0 {
maxrow++

View file

@ -20,9 +20,6 @@ func Test_KeyPrefix(t *testing.T) {
// prefix example: i%f;v:12345678<
prefix := Prefix(index, field, view, 0)
//fmt.Printf("needle = '%v'\n", string(needle))
//fmt.Printf("prefix = '%v'\n", string(prefix))
if !bytes.HasPrefix(needle, prefix) {
panic(fmt.Sprintf("Prefix() output '%v'was not a prefix of Key() '%v'", string(needle), string(prefix)))
}

View file

@ -74,7 +74,6 @@ func TempDir(tb testing.TB, pattern string) (path string, err error) {
if err == nil {
Cleanup(tb, func() {
os.RemoveAll(path)
// fmt.Println("--- testhook: cleaning up dir", path, tb.Name())
})
}
return path, err
@ -89,7 +88,6 @@ func TempFile(tb testing.TB, pattern string) (file *os.File, err error) {
Cleanup(tb, func() {
file.Close()
os.Remove(path)
// fmt.Println("--- testhook: cleaning up file", path, tb.Name())
})
}
return file, err

View file

@ -21,9 +21,6 @@ func Test_KeyPrefix(t *testing.T) {
// prefix example: i%f;v:12345678<
prefix := Prefix(index, field, view, shard)
//fmt.Printf("needle = '%v'\n", string(needle))
//fmt.Printf("prefix = '%v'\n", string(prefix))
if !bytes.HasPrefix(needle, prefix) {
panic(fmt.Sprintf("Prefix() output '%v'was not a prefix of Key() '%v'", string(needle), string(prefix)))
}