Commit Graph

181 Commits

Author SHA1 Message Date
James Mills
b5b9e07c96
Added auto merge workflow 2020-01-26 14:11:25 +10:00
James Mills
433e1b1aed
Added auto approve workflow 2020-01-26 14:07:31 +10:00
James Mills
35318126b7
Added auto-merge workflow for dependabot 2020-01-26 13:59:46 +10:00
James Mills
ccf2517b8f
Added autoassign workflow 2020-01-26 13:48:47 +10:00
James Mills
c25655fcfa
Create stale.yml 2020-01-26 13:30:23 +10:00
James Mills
08e4c9856e
Added labeler workflow 2020-01-26 13:20:18 +10:00
James Mills
96dac702e9
Added Greetings Workflow 2020-01-26 13:14:29 +10:00
James Mills
31081bdf8a
Update README.md 2020-01-26 12:58:36 +10:00
James Mills
c3bb135c8f
Re-fixed README badges 2020-01-26 07:40:44 +10:00
James Mills
e6b518af08
Removed Drone CI badge and Added badges for Github Actions Workflows 2020-01-26 07:35:35 +10:00
James Mills
45c81452c5
Added test harness logic to skip some tests on Windows (#129) 2020-01-26 07:31:58 +10:00
James Mills
cae49b3319
Adds Github Actions workflow for Building and Testing (#127)
* Added Github Actions workflow for Reviewing, Building and Testing

* Added codecov workflow

* Fix version of Go used for codecov workflow

* Fixed coverage options
2020-01-26 00:21:34 +10:00
dependabot-preview[bot]
e4e52e907b Bump github.com/tidwall/redcon from 1.1.0 to 1.1.1 (#125)
Bumps [github.com/tidwall/redcon](https://github.com/tidwall/redcon) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/tidwall/redcon/releases)
- [Commits](https://github.com/tidwall/redcon/compare/v1.1.0...v1.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-21 09:39:41 +10:00
dependabot-preview[bot]
26ddef1e55 Bump github.com/spf13/viper from 1.6.1 to 1.6.2 (#124)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.6.1...v1.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-17 00:11:53 +02:00
dependabot-preview[bot]
fba88e5f2c Bump github.com/pkg/errors from 0.9.0 to 0.9.1 (#123)
Bumps [github.com/pkg/errors](https://github.com/pkg/errors) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/pkg/errors/releases)
- [Commits](https://github.com/pkg/errors/compare/v0.9.0...v0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-16 01:55:28 +02:00
dependabot-preview[bot]
f5a24dbc09 Bump github.com/pkg/errors from 0.8.1 to 0.9.0 (#122)
Bumps [github.com/pkg/errors](https://github.com/pkg/errors) from 0.8.1 to 0.9.0.
- [Release notes](https://github.com/pkg/errors/releases)
- [Commits](https://github.com/pkg/errors/compare/v0.8.1...v0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 22:36:39 +02:00
dependabot-preview[bot]
30e8f33b5d Bump github.com/tidwall/redcon from 1.0.1 to 1.1.0 (#121)
Bumps [github.com/tidwall/redcon](https://github.com/tidwall/redcon) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/tidwall/redcon/releases)
- [Commits](https://github.com/tidwall/redcon/compare/v1.0.1...v1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 22:30:44 +02:00
dependabot-preview[bot]
6395c9bb12 Bump github.com/spf13/viper from 1.4.0 to 1.6.1 (#120)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.4.0 to 1.6.1.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.4.0...v1.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
2019-12-26 15:12:40 +10:00
dependabot-preview[bot]
9daab6dbe0 Bump github.com/spf13/pflag from 1.0.3 to 1.0.5 (#119)
Bumps [github.com/spf13/pflag](https://github.com/spf13/pflag) from 1.0.3 to 1.0.5.
- [Release notes](https://github.com/spf13/pflag/releases)
- [Commits](https://github.com/spf13/pflag/compare/v1.0.3...v1.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
2019-12-26 14:55:10 +10:00
dependabot-preview[bot]
a17929665a Bump github.com/tidwall/redcon from 1.0.0 to 1.0.1 (#118)
Bumps [github.com/tidwall/redcon](https://github.com/tidwall/redcon) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/tidwall/redcon/releases)
- [Commits](https://github.com/tidwall/redcon/compare/v1.0.0...v1.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
2019-12-26 14:40:32 +10:00
dependabot-preview[bot]
4577311471 Bump github.com/stretchr/testify from 1.3.0 to 1.4.0 (#117)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.3.0...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-26 14:36:00 +10:00
James Mills
558fa898d5
Add DependaBot config 2019-12-26 13:42:01 +10:00
Alain Gilbert
ca06e332d6 Add DeleteAll function (#116) 2019-12-23 21:35:59 +10:00
Alain Gilbert
be3fd71ebe Fix loadIndex to be deterministic (#115) 2019-12-20 14:45:10 +10:00
Leonid Zharikov
4dfe42cb3b Export method reopen (#113) 2019-11-16 21:08:45 +10:00
James Mills
803b08949e
Fix setup target in Makefile to install mockery correctly 2019-10-17 13:59:00 +10:00
James Mills
65e9317d26
Fix glfmt/golint issues 2019-10-14 16:55:47 +10:00
James Mills
c4e12e0019
Fix spelling mistake in README s/Sponser/Sponsor 2019-10-08 22:04:22 +10:00
Steve Mynott
029f901bb7 fix example (#106) 2019-09-28 08:08:45 +10:00
James Mills
af8bf54962
Add *.db to ignore future accidental commits of a bitcask db to the repo 2019-09-26 21:09:27 +10:00
James Mills
5ea05fb3c2
Add unit test for opening bad database with corrupted/invalid datafiles (#105) 2019-09-26 21:07:13 +10:00
James Mills
5fe19989d4
Update Drone CI test pipeline 2019-09-25 22:15:22 +10:00
Ignacio Hagopian
498ea4069c codebeat: Code quality improvement (#103)
* codebeat: improve & bugfix

* codebeat: refactor to improve readability

* bugfix

* bugfix

* internal/data/codec: improve code coverage
2019-09-24 07:19:07 +10:00
James Mills
42c2b810bf
Update README.md 2019-09-22 21:26:52 +10:00
Ignacio Hagopian
16a7feb603
cmd/bitcask: add recovery tool for datafiles (#102)
* cmd/bitcask: refactor recovery index logic

* cmd/bitcask: first version of datafile recovery tool

* cmd/bitcask: finished recovery datafile tool

* cmd/bitcask: temporary script to test recovery tool

* cmd/bitcask: remove commited binary file

* cmd/bitcask: delete bash test
2019-09-21 18:33:36 -03:00
Ignacio Hagopian
f17187a5c7
Test for data corruption in datafile decoding (#99)
* internal/data: move codec to own subpackage

* internal/data/codec: check & test nil Entry Decode

* internal/data/decoder: test for short prefix error

* internal/data/codec: test invalid key & value sizes

* internal/data/codec: check & test for truncated data

* interna/data/codec: use assert for tests
2019-09-16 09:29:08 -03:00
Ignacio Hagopian
5be114adab
Makefile setup & key/value coherent datatypes & refactoring (#98)
* internal/data: comment exported functions

* internal/data: make smaller codec exported api surface

* make key and value sizes serializing bubble up to everything

* Makefile setup & go mod tidy
2019-09-12 10:44:26 -03:00
Ignacio Hagopian
7e0fa151f7 fix test compilation (#97) 2019-09-10 06:25:09 +10:00
James Mills
d59d5ad8c2
Improves Test Coverage by covering error cases (#95)
* Add Unit  Test for testing a corrupted config

* Add Unit Test for testing errors from .Stats()

* Refactor  Datafile into an interface and add Unit Tests for testing Merge() errors

* Refactor indexer into an interface and add Unit Tests for .Close() errors

* Add Unit Tests for .Delete() errors

* Add Unit Tests for  testing Put/Get errors

* Add Unit Test for testing Open errors (bad path for example)

* Refactor out bitcask.writeConfig

* Add more tests for config errors

* Add unit test for options that might error

* Add more test cases for close errors

* Add test case for rotating datafiles

* Fix a possible data race in .Stats()

* Add test case for checksum errors

* Add test case for Sync errors with Put and WithSync enabled

* Refactor and use testify.mock for mocks and generate mocks for all interfaces

* Refactor TestCloseErrors

* Refactored TestDeleteErrors

* Refactored TestGetErrors

* Refactored TestPutErrors

* Refactored TestMergeErrors and fixed a bug with .Fold()

* Add test case for Scan() errors

* Apparently only Scan() can return nil Node()s?
2019-09-09 07:18:38 +10:00
Ignacio Hagopian
13e35b7acc bitcask: fix data races & use Encode() to serialize config (#94) 2019-09-07 09:09:08 +10:00
Ignacio Hagopian
0d3a9213ed cmd/bitcask: recovery tool (#92)
* cmd/bitcask: recovery tool

* refactor configuration & use it in recover tool
2019-09-07 07:57:30 +10:00
James Mills
f4fb4972ee
Improves test coverage by adding some missing unit tests (#90)
* Add Unit Test for testing WithSync() option

* Add Unit Test for testing re-indexing

* Add Unit Test for testing re-indexing with deleted keys (tombstone values)
2019-09-04 22:45:04 +10:00
James Mills
1108840967
Refactor the bitcaskd (redis compatible server) sample to improve code quality (#88) 2019-09-04 22:44:33 +10:00
James Mills
003c3abc42
Update to Go 1.13 and update README with new benchmarks (#89) 2019-09-04 22:43:53 +10:00
Ignacio Hagopian
a2b5ae2287 fix: check of persisted index values (#91) 2019-09-04 22:42:32 +10:00
James Mills
1c7df7f9c7
Removed unused readConfig() (#87) 2019-09-04 21:25:31 +10:00
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
24ab3fbf27
Update README.md 2019-09-04 08:20:44 +10:00
Ignacio Hagopian
8041a4c1e7 Refactor and general tests for codec index (#83)
* codec_index: unexport const fields

* codec_index: unexport internal functions and doc exported ones

* codec_index: rename func & return errors for corruption

* codec_index: new test for ReadIndex, WriteIndex, and read corruption

* Update internal/codec_index.go

Co-Authored-By: James Mills <1290234+prologic@users.noreply.github.com>

* Update internal/codec_index.go

Co-Authored-By: James Mills <1290234+prologic@users.noreply.github.com>
2019-09-03 08:19:35 +10:00
James Mills
50d3971e86
Fixed a bug with incorrect offsets populating the trie (#82) 2019-09-02 19:44:11 +10:00