mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Merge pull request #932 from jaten-molecula/pr919
api usage should ignore tx stores. fixes #919
This commit is contained in:
commit
8dbfaf5045
2 changed files with 6 additions and 3 deletions
3
api.go
3
api.go
|
|
@ -812,6 +812,9 @@ func (api *API) Usage() (map[string]int64, int64, error) {
|
|||
if !file.IsDir() {
|
||||
continue
|
||||
}
|
||||
if api.holder.Txf().IsTxDatabasePath(file.Name()) {
|
||||
continue
|
||||
}
|
||||
fullName := path.Join(dirName, file.Name())
|
||||
indexSizes[file.Name()], err = diskUsage(fullName)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -95,9 +95,9 @@ func Test_TxFactory_Qcx_query_context(t *testing.T) {
|
|||
// allow all goro to finish before Closing the lmdb.env, otherwise
|
||||
// we will crash as the goroutines making Tx will try to use the env
|
||||
// after it is closed. It can take quite a while.
|
||||
// one writer might be blocking the other... so ask for only N-1 at first.
|
||||
barrier.BlockUntil(N - 1)
|
||||
//barrier.BlockUntil(N)
|
||||
// one writer might be blocking the other... so ask for only N-2 at first
|
||||
// to avoid deadlock.
|
||||
barrier.BlockUntil(N - 2)
|
||||
barrier.UnblockReaders()
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue