1
0
mirror of https://github.com/taigrr/bitcask synced 2025-01-18 04:03:17 -08:00

49 Commits

Author SHA1 Message Date
Ignacio Hagopian
93cc1d409f codec_index: check sizes, new tests for data corruption & refactor (#84)
* bitcask/codec_index: check key and data sizes

* codec_index: tests for key and data size overflows

* codec_index: simplify internal funcs for unused returns
2019-09-04 12:26:26 +10:00
James Mills
50d3971e86
Fixed a bug with incorrect offsets populating the trie (#82) 2019-09-02 19:44:11 +10:00
Ignacio Hagopian
877bf982b1 fix go vet (#80) 2019-09-02 10:20:56 +10:00
James Mills
abbbeb8e1d
Replace keydir with ART trie (#75)
* Replace keydir with ART trie

* Address some review feedback

* Address review feedback (consts)
2019-09-02 08:38:56 +10:00
James Mills
b3d6f734b6
Use an Adaptive Radix Tree (#71) 2019-08-30 08:13:24 +10:00
Awn
e8bee948bc Make optimised scan functionality optional (#68) 2019-08-16 10:51:59 +10:00
James Mills
c5a565cd82
Adds WithSync(...) option to turn on sync after write durability (#63)
* Added WithSync(...) option to turn  on sync after write durability

* Add Sync/NoSync benchmark variants for Put()
2019-08-12 06:47:46 +10:00
James Mills
7204a33512
Fix and cleanup some unnecessary internal sub-packages and duplication 2019-08-08 22:28:25 +10:00
Awn
af43cfa8f1 Remove merge function (#60)
* tidy: clean up some leftovers

Fixes #56
Fixes #57
Fixes #58

* api: remove standalone merge function

Fixes #55
2019-08-08 19:51:45 +10:00
Ignacio Hagopian
fd179b4a86 custom high-performance encoder implementation (#52) 2019-08-08 09:21:46 +10:00
James Mills
755b1879b5
Use []byte byte slices as keys directly avoiding serialing string(s) (#46) (#51) 2019-08-08 08:14:48 +10:00
James Mills
d0c913ccee
Revert "Use []byte byte slices as keys directly avoiding serialing string(s) (#46)" (#50)
This reverts commit 3c1808cad3f19c23c6e4aacd4cfbbc4a04da1c08.
2019-08-08 08:06:38 +10:00
James Mills
3c1808cad3
Use []byte byte slices as keys directly avoiding serialing string(s) (#46) 2019-08-08 07:59:11 +10:00
James Mills
5d1dd6657a
Fixed handling of missing config.json from cli behavior 2019-08-07 21:47:51 +10:00
James Mills
82e26449fa
Added the same functional options to the bitcask CLI and persist options to the db store (#40) 2019-08-07 10:23:10 +10:00
Ignacio Hagopian
f2b5515e03 update trie dependency to take advantage of improvements (#45) 2019-08-06 08:05:41 +10:00
Ignacio Hagopian
a407905ae2 Improve Get/Put performance with optional mempooling (#36)
* avoid unnecessary use of encoder/decoder to decrease memory allocations

* add an optional configurable mempool to avoid extra allocs

* add doc.go with examples
2019-08-05 07:23:07 +10:00
James Mills
912371645d
Fixed an off-by-one bug with managing datafiles (#31) 2019-07-29 23:49:37 +10:00
James Mills
51bac21c0a
Improves Merge() operation by also pruning old key/value pairs (#29)
* Added new API Stats() and Prune()

* Improved Merge() logic to also prune old key/values and actually reclaim disk space

* Added backward compat for the old Merge() function

* Refactor indexing of keys to items (hints)

* Remove redundant TestOpenMerge

* Add unit test for Stats()

* Improve TestMerge()
2019-07-27 07:52:25 +10:00
Awn
b7ac95d66a remove merge folder after merge completes (#26) 2019-07-25 08:31:44 +10:00
Awn
479cabcc8e patch: use directory within database path for merge (#21) 2019-07-25 08:01:12 +10:00
Yury Fedorov
43334647a6 Fix typos in bitcask.go docs (#10) 2019-05-26 19:27:03 +10:00
James Mills
711d08ce91
Increased read performance by ~3-4x by removing another unnecessary I/O operation (Seek) 2019-03-23 12:14:15 +10:00
James Mills
7149cb9afe
Fixed concurrency bug with reopening datafiles when maxDatafileSize is exceeded 2019-03-22 17:59:07 +10:00
James Mills
c593bc966f
Refactor Datafile.Size() 2019-03-22 17:33:24 +10:00
James Mills
2400dd86d5
Add docs for bitcask 2019-03-21 17:46:53 +10:00
James Mills
27eb922ba2
Add docs for options 2019-03-21 17:20:53 +10:00
James Mills
352c32ee12
Add Len() to exported API (extended API) 2019-03-21 10:47:50 +10:00
James Mills
aaea7273c3
Add Keys() to exported API (extended API) 2019-03-21 10:41:56 +10:00
James Mills
962e53af17
Add Has() to exported API (extended API) 2019-03-21 10:24:48 +10:00
James Mills
2d9bfbb408
Unexport NewDefaultConfig (not useful for public consumption) 2019-03-20 07:46:26 +10:00
James Mills
d8a48f9eea
Use pre-defined errors as they are comparable and useful as exported symbols 2019-03-20 07:39:03 +10:00
James Mills
1298240f53
Unexport some internal implemtnation details 2019-03-18 17:31:31 +10:00
James Mills
6fe6fe0689
Refactored configuration option handling. Fixes #3 2019-03-17 13:53:30 +10:00
James Mills
e83608b903
Fixed missing error handling opening new Datafile(s) during Put() Fixes #4 2019-03-17 13:47:07 +10:00
James Mills
67ab944db7
Refactored some internals and removed timestamp field (unsure why it was needed in the original paper) 2019-03-16 12:40:24 +10:00
James Mills
e9c858d43f
Add CRC Checksum checks on reading values back 2019-03-16 12:16:23 +10:00
James Mills
120e854444
Improved error messages 2019-03-16 11:47:22 +10:00
James Mills
d2f44d1513
Fix a race condition + Use my fork of trie 2019-03-16 11:22:55 +10:00
James Mills
3f1d6635c4
Add prefix scan for keys using a Trie 2019-03-15 23:48:50 +10:00
James Mills
9f0a357ca0
Remove lock file on Close() 2019-03-14 21:50:23 +10:00
James Mills
d24a01797a
Added WithMaxKeySize() and WithMaxValueSize() options 2019-03-14 21:31:23 +10:00
James Mills
bc8f6c6718
Change locking error message 2019-03-14 21:31:01 +10:00
James Mills
b6c212d60c
Refactored option handling 2019-03-14 21:24:31 +10:00
James Mills
238ff6ab59
Add a simple Redis compatible server daemon (bitcaskd) 2019-03-13 21:19:46 +10:00
James Mills
f4b7918e93
Add flock on database Open()/Close() to prevent multiple concurrent processes write access. Fixes #2 2019-03-13 20:21:15 +10:00
James Mills
f88919ecd0
Fixed read performance by ~6x in general by caching all inactive datafiles. Fixes #1 2019-03-13 19:24:35 +10:00
James Mills
904f6b19a0
Improve read performance by ~6x for active Datafile by not reopening it each time 2019-03-13 07:43:31 +10:00
James Mills
a42cd20ddf
Initial Commit 2019-03-12 23:56:57 +10:00