rocksdb-native 3.11.0 → 3.11.1

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/CMakeLists.txt CHANGED
@@ -9,7 +9,7 @@ project(rocksdb_native C CXX)
9
9
 
10
10
  bare_target(target)
11
11
 
12
- fetch_package("github:holepunchto/librocksdb#65ec235")
12
+ fetch_package("github:holepunchto/librocksdb#8adf3cf")
13
13
  fetch_package("github:holepunchto/libjstl#098664c")
14
14
 
15
15
  add_bare_module(rocksdb_native_bare)
package/binding.cc CHANGED
@@ -271,14 +271,14 @@ rocksdb_native__on_close(rocksdb_close_t *handle, int status) {
271
271
  auto teardown = db->teardown;
272
272
 
273
273
  if (db->exiting) {
274
- db->ctx.reset();
275
-
276
274
  if (db->closing) {
277
275
  req->on_close.reset();
278
276
  req->ctx.reset();
279
277
  } else {
280
278
  free(req);
281
279
  }
280
+
281
+ db->ctx.reset();
282
282
  } else {
283
283
  js_handle_scope_t *scope;
284
284
  err = js_open_handle_scope(env, &scope);
@@ -292,10 +292,11 @@ rocksdb_native__on_close(rocksdb_close_t *handle, int status) {
292
292
  err = js_get_reference_value(env, req->on_close, cb);
293
293
  assert(err == 0);
294
294
 
295
- db->ctx.reset();
296
295
  req->on_close.reset();
297
296
  req->ctx.reset();
298
297
 
298
+ db->ctx.reset();
299
+
299
300
  js_call_function_with_checkpoint(env, cb, ctx);
300
301
 
301
302
  err = js_close_handle_scope(env, scope);
package/lib/state.js CHANGED
@@ -28,8 +28,7 @@ module.exports = class RocksDBState extends ReadyResource {
28
28
  skipStatsUpdateOnOpen = false,
29
29
  useDirectIOForFlushAndCompaction = false,
30
30
  maxFileOpeningThreads = 16,
31
- lock = null,
32
- preopen = null
31
+ lock = null
33
32
  } = opts
34
33
 
35
34
  this.path = path
@@ -47,7 +46,6 @@ module.exports = class RocksDBState extends ReadyResource {
47
46
  this._updatingSignal = new SignalPromise()
48
47
  this._columnsFlushed = false
49
48
  this._lock = lock
50
- this._preopen = preopen
51
49
  this._readBatches = []
52
50
  this._writeBatches = []
53
51
 
@@ -142,8 +140,6 @@ module.exports = class RocksDBState extends ReadyResource {
142
140
 
143
141
  if (this._lock) await this._lock.ready()
144
142
 
145
- if (this._preopen) await this._preopen
146
-
147
143
  const req = { resolve: null, reject: null, handle: null }
148
144
 
149
145
  const promise = new Promise((resolve, reject) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rocksdb-native",
3
- "version": "3.11.0",
3
+ "version": "3.11.1",
4
4
  "description": "librocksdb bindings for JavaScript",
5
5
  "exports": {
6
6
  ".": "./index.js",