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-datastore
Commits
82516f58
Commit
82516f58
authored
Aug 07, 2018
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix autobatch delete from buffer error
parent
10b34df0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
autobatch/autobatch.go
autobatch/autobatch.go
+6
-1
No files found.
autobatch/autobatch.go
View file @
82516f58
...
...
@@ -30,9 +30,14 @@ func NewAutoBatching(d ds.Batching, size int) *Datastore {
// Delete deletes a key/value
func
(
d
*
Datastore
)
Delete
(
k
ds
.
Key
)
error
{
_
,
found
:=
d
.
buffer
[
k
]
delete
(
d
.
buffer
,
k
)
return
d
.
child
.
Delete
(
k
)
err
:=
d
.
child
.
Delete
(
k
)
if
found
&&
err
==
ds
.
ErrNotFound
{
return
nil
}
return
err
}
// Get retrieves a value given a key.
...
...
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