diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2016-10-03 13:04:32 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2016-10-03 13:04:32 -0600 |
commit | 0d68f169c55a0b7823b9cd06c8b4955b7da673be (patch) | |
tree | b030b5025c9984cc3cd55dba574b5e29e6de6dfd | |
parent | Merge pull request #595 from namore/add_warning_foreach_keys (diff) | |
download | dedo-0d68f169c55a0b7823b9cd06c8b4955b7da673be.tar.gz dedo-0d68f169c55a0b7823b9cd06c8b4955b7da673be.tar.xz |
Fix Stats.Sub() for Stats.TxN.
The subtraction for `TxN` was previously transposed which caused
the result to be a negative number. This change alters the order
to return the correct (positive) result.
-rw-r--r-- | db.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -952,7 +952,7 @@ func (s *Stats) Sub(other *Stats) Stats { diff.PendingPageN = s.PendingPageN diff.FreeAlloc = s.FreeAlloc diff.FreelistInuse = s.FreelistInuse - diff.TxN = other.TxN - s.TxN + diff.TxN = s.TxN - other.TxN diff.TxStats = s.TxStats.Sub(&other.TxStats) return diff } |