pixl-server-storage 3.0.21 → 3.0.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixl-server-storage",
3
- "version": "3.0.21",
3
+ "version": "3.0.22",
4
4
  "description": "A key/value/list storage component for the pixl-server framework.",
5
5
  "author": "Joseph Huckaby <jhuckaby@gmail.com>",
6
6
  "homepage": "https://github.com/jhuckaby/pixl-server-storage",
package/storage.js CHANGED
@@ -893,6 +893,7 @@ module.exports = Class.create({
893
893
  },
894
894
  function() {
895
895
  // all locks released
896
+ self.logDebug(9, "All locks released.");
896
897
  callback();
897
898
  }
898
899
  ); // whilst
package/transaction.js CHANGED
@@ -638,14 +638,17 @@ module.exports = Class.create({
638
638
  }
639
639
 
640
640
  // complete, unlock and remove transaction from memory
641
- self.unlock( 'C|'+path );
642
- self._transUnlock(path);
643
641
  self.transactions[path].keys = {}; // release memory
644
642
  self.transactions[path].values = {}; // release memory
645
643
  self.transactions[path].queue = []; // release memory
646
644
  delete self.transactions[path];
647
645
 
648
646
  self.logDebug(3, "Transaction rollback complete: " + trans.id, { path: path });
647
+
648
+ // unlock at the VERY end, as a new transaction may be waiting on the same path
649
+ self.unlock( 'C|'+path );
650
+ self._transUnlock(path);
651
+
649
652
  callback();
650
653
  }); // fs.unlink
651
654
  } // done with log