mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-05 08:10:50 +00:00
Merge pull request #1238 from niaow/fix-snapshot-queue
Fix automatic snapshot queue enable check
This commit is contained in:
commit
26ab79ecb8
2 changed files with 3 additions and 7 deletions
|
|
@ -782,12 +782,8 @@ func (h *Holder) Close() error {
|
|||
func (h *Holder) NeedsSnapshot() bool {
|
||||
h.mu.RLock()
|
||||
defer h.mu.RUnlock()
|
||||
for _, idx := range h.Indexes() {
|
||||
if idx.NeedsSnapshot() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
|
||||
return h.txf.NeedsSnapshot()
|
||||
}
|
||||
|
||||
// HasData returns true if Holder contains at least one index.
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ type Server struct { // nolint: maligned
|
|||
dataDir string
|
||||
|
||||
// Threshold for logging long-running queries
|
||||
longQueryTime time.Duration
|
||||
longQueryTime time.Duration
|
||||
queryHistoryLength int
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue