Skip to content

Strata 0.0.4

Choose a tag to compare

@bigeasy bigeasy released this 24 Jul 01:12
· 1780 commits to master since this release

Rock strata - Gardiners Creek, East Malvern
Rock Strata, Gardiners Greek, East Malvern by Alpha

Removing the JSONSize Falsework

Demarius Chrite removed an assertion against the modification of the records returned by Strata's iterators. If a user had changed the JSON size -- the string length of an object once it has been serialized using JSON.stringify -- then an assertion would be triggered the next time the leaf page that contained the record was locked. Locket was triggering this assertion when it assigned a placeholder transactionId property to the records stored in a table that didn't store a transactionId.

This assertion was removed because the application should be allowed to take advantage of the MRU cache of pages and the their objects. When a page is purged from the cache, all of its objects are purged form the cache. If the application has any housekeeping to go with an object, it should also be purged when the page is purged. Easiest way to accomplish this? Tuck some of that data into object returned to you from the Strata iterator.

The assertion was a falsework to ensure that Strata itself was not mutating the records it was storing, but we can't have that assertion and allow the user to piggyback on the MRU, so we've gotten rid of that assertion.

See #118.

Subtle Shared Lock Continuation Bug

When continuing operations waiting on a shared lock, we iterated over the the array of waiting functions using forEach, invoking those functions. Some of those functions called unlock before the nextTick and in doing so, removed themselves from the array of functions participating in the shared lock. This it he same array of the aforementioned forEach. Mutating that array cased the forEach to get confused and skip functions.

We now copy the array with slice() before calling forEach.

This bug was discovered when the lock was extracted to Sequester.

See: #116. bigeasy/sequester#15.

Installing Strata 0.0.4

npm install b-tree

Issue by Issue

  • Stop monitoring stringified object size. #118.
  • unlock needs to slice the array before continuing callbacks. #116.
  • Upgrade Proof to 0.0.32. #114.