@nxtedition/rocksdb 7.1.7 → 7.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +5 -2
- package/package.json +1 -1
- package/prebuilds/darwin-x64/node.napi.node +0 -0
package/index.js
CHANGED
|
@@ -115,7 +115,7 @@ class RocksLevel extends AbstractLevel {
|
|
|
115
115
|
[kUnref] () {
|
|
116
116
|
this[kRefs]--
|
|
117
117
|
if (this[kRefs] === 0 && this[kPendingClose]) {
|
|
118
|
-
this[kPendingClose]
|
|
118
|
+
process.nextTick(this[kPendingClose])
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -205,7 +205,10 @@ class RocksLevel extends AbstractLevel {
|
|
|
205
205
|
try {
|
|
206
206
|
const seq = this.sequence
|
|
207
207
|
let sync = true
|
|
208
|
+
this[kRef]()
|
|
208
209
|
binding.batch_write(this[kContext], context, options, (err) => {
|
|
210
|
+
this[kUnref]()
|
|
211
|
+
|
|
209
212
|
if (!err) {
|
|
210
213
|
this.emit('update', {
|
|
211
214
|
rows: batch.toArray(),
|
|
@@ -343,7 +346,7 @@ class RocksLevel extends AbstractLevel {
|
|
|
343
346
|
const db = this
|
|
344
347
|
|
|
345
348
|
try {
|
|
346
|
-
let since = options.since
|
|
349
|
+
let since = (options.since ?? 0) + 1
|
|
347
350
|
while (true) {
|
|
348
351
|
const buffer = new Readable({
|
|
349
352
|
signal: ac.signal,
|
package/package.json
CHANGED
|
Binary file
|