Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-ds-badger
Commits
9efc1de4
Unverified
Commit
9efc1de4
authored
Apr 07, 2020
by
Steven Allen
Committed by
GitHub
Apr 07, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #87 from ipfs/fix/query-verify-open
fix: verify that the datastore is still open when querying
parents
adacbc25
390ae7d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
datastore.go
datastore.go
+3
-0
No files found.
datastore.go
View file @
9efc1de4
...
...
@@ -342,6 +342,9 @@ func (d *Datastore) Delete(key ds.Key) error {
func
(
d
*
Datastore
)
Query
(
q
dsq
.
Query
)
(
dsq
.
Results
,
error
)
{
d
.
closeLk
.
RLock
()
defer
d
.
closeLk
.
RUnlock
()
if
d
.
closed
{
return
nil
,
ErrClosed
}
txn
:=
d
.
newImplicitTransaction
(
true
)
// We cannot defer txn.Discard() here, as the txn must remain active while the iterator is open.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment