summaryrefslogtreecommitdiff
path: root/src/ebtree
Commit message (Collapse)AuthorAgeFilesLines
* Optimize lookup/3ebtree-lookup-optRobert Newson2021-02-271-4/+4
| | | | | A tidier version of https://github.com/apache/couchdb/pull/3384 that saves an unnecessary call to collate.
* Merge pull request #3384 from apache/ebtree-lookup-collate-eqRobert Newson2021-02-261-6/+6
|\ | | | | use collate in lookup
| * use collate in lookupRobert Newson2021-02-261-6/+6
| |
* | Fix ebtree:lookup_multi/3Paul J. Davis2021-02-261-6/+5
| | | | | | | | | | | | | | If one of the provided lookup keys doesn't exist in the ebtree, it can inadvertently prevent a second lookup key from being found if it the first key greater than the missing lookup key is equal to the second lookup key.
* | Add failing cases for ebtree:lookup_multi/3 bugPaul J. Davis2021-02-261-1/+2
|/ | | | | | These two test cases expose the subtle bug in ebtree:lookup_multi/3 where a key that doesn't exist in the tree can prevent a subsequent lookup key from matching in the same KV node.
* Update README.mdRobert Newson2021-01-151-6/+0
| | | 1. The caching effort was a bust and has been removed. 2) chunkify can be done externally with a custom persist_fun.
* Assure that all node ids are the same lengthRobert Newson2020-11-121-1/+1
|
* Avoid deleting UUID keys that start with zerosPaul J. Davis2020-11-121-1/+1
| | | | | Any ebtree that uses chunked key encoding will accidentally wipe out any nodes that have a UUID with more than one leading zero byte.
* Remove ebtree cachingPaul J. Davis2020-11-101-112/+18
| | | | | | | | The ebtree caching layer does not work correctly in conjunction with FoundationDB transaction retry semantics. If we incorrectly cache nodes that are not actually read from FoundationDB, a retried transaction will rely on incorrectly cached state and corrupt the ebtree persisted in FoundationDB.
* Fix bug in ebtree:umerge_members/4Paul J. Davis2020-09-171-1/+17
| | | | | Caught during Elixir tests. I've added a unit test to `ebtree.erl` to ensure we don't regress in the future.
* Disable node validation in productionPaul J. Davis2020-09-031-1/+7
| | | | | This keeps validation during tests but disables the validation during production to avoid the overhead of collation.
* Optimize umerge_membersPaul J. Davis2020-09-031-4/+20
| | | | | | Using lists:umerge/3 adds extra invocations of the collation algorithm because its using `=<` semantics when ebtree collations are capable of producing `lt, eq, gt` results.
* Implement caching of immutable ebtree nodesRobert Newson2020-09-031-43/+142
| | | | Inner nodes of the B+Tree are now immutable so that they can be cached.
* Implement ebtree:lookup_multi/3Paul J. Davis2020-09-031-0/+61
| | | | | This allows looking up multiple keys simultaneously which reduces the amount of overhead due to node serialization and collation.
* Implement ebtree:insert_multi/3Paul J. Davis2020-09-031-0/+164
| | | | | This allows for batch insertion of keys in order to minimize node serialization and collation costs.
* Pluggable persist_funRobert Newson2020-08-061-6/+25
|
* extra testsRobert Newson2020-08-061-0/+49
|
* Tighten expectation of members format by levelRobert Newson2020-08-061-15/+16
|
* Speed up ebtree test suite without losing coverageRobert Newson2020-08-051-41/+18
|
* Fix range scans over an empty treePaul J. Davis2020-08-051-0/+24
|
* Handle empty reduce batchesPaul J. Davis2020-08-051-0/+9
|
* Export reduce/5Paul J. Davis2020-08-051-0/+1
|
* Validate the result from collate_funRobert Newson2020-08-041-1/+11
|
* Call collate for group equalityprototype/fdb-layer-ebtree-group-reduce-fixRobert Newson2020-07-291-2/+4
|
* Allow inclusive_start/endRobert Newson2020-07-291-84/+98
| | | | We also redefine the internal collation api for clarity.
* Replace the 'true' clauses in visit with more explicit onesprototype/fdb-layer-ebtree-true-clausesRobert Newson2020-07-291-6/+9
|
* separate out collation wrapper to avoid spurious comparisonsRobert Newson2020-07-241-26/+45
| | | | Ensure we only collate nodes, members and k/v's as intended.
* Only call erlfdb:set if the node changesRobert Newson2020-07-241-4/+11
| | | | | This removes spurious conflicts and allows concurrent writing to non-overlapping parts of the tree.
* Pass fdb key to the encode_funRobert Newson2020-07-221-31/+23
| | | | | | This commit removes the get/wait/future split as it made it much harder to pass the fdb key down. Since those functions only call each other, there is no loss of functionality.
* Use stored order without complaintprototype/fdb-layer-ebtree-orderRobert Newson2020-07-221-17/+16
|
* Allow encode/decode customisationprototype/fdb-layer-ebtreeRobert Newson2020-07-211-41/+47
|
* Merge ebtree into src/ebtreeRobert Newson2020-07-215-0/+1391