Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Implement a PersistentDatastore by adding DiskUsage method #27

Merged
merged 24 commits into from
Mar 9, 2018
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
aa08d62
Feat: Implement a PersistentDatastore by adding DiskUsage method
hsanjuan Feb 16, 2018
3f8a325
Update .travis.yml: latest go
hsanjuan Feb 16, 2018
b36ab50
DiskUsage: cache diskUsage on Close()
hsanjuan Feb 16, 2018
9a62d47
Manage diskUsage with atomic.AddInt64 (no channel). Use tmp file + re…
hsanjuan Feb 16, 2018
09540a8
Remove redundant comments
hsanjuan Feb 16, 2018
9523f44
Address race conditions when writing/deleting the same key concurrently
hsanjuan Feb 19, 2018
5b0b512
Document that datastore Put does not replace values
hsanjuan Feb 19, 2018
3f9c946
Comment TestPutOverwrite
hsanjuan Feb 19, 2018
5f86518
Implement locking and discard for concurrent operations on the same key
hsanjuan Feb 23, 2018
acb654d
Do less operation in tests (travis fails on mac)
hsanjuan Feb 23, 2018
a6cfe89
Reduce counts again
hsanjuan Feb 23, 2018
7918fbd
DiskUsage: address comments. Use sync.Map.
hsanjuan Feb 27, 2018
3963741
Add rw and rwundo rules to Makefile
hsanjuan Feb 27, 2018
959a053
DiskUsage: use one-off locks for operations
hsanjuan Feb 27, 2018
9cf8b73
DiskUsage: write checkpoint file when du changes by more than 1 percent
hsanjuan Feb 27, 2018
b11a417
Fix tests so they ignore disk usage cache file
hsanjuan Feb 27, 2018
a139599
Rename: update disk usage when rename fails too..
hsanjuan Feb 28, 2018
90ed3f7
Improve rename comment and be less explicit on field initialization
hsanjuan Mar 1, 2018
bb4fb62
Do not use filepath.Walk, use Readdir instead.
hsanjuan Mar 1, 2018
2cff8a1
Estimate diskUsage for folders with more than 100 files
hsanjuan Mar 2, 2018
ca7983c
Select file randomly when there are too many to read
hsanjuan Mar 2, 2018
026e04c
Fix typo
hsanjuan Mar 5, 2018
182e8b1
fix tests
hsanjuan Mar 5, 2018
82aa8d1
Set time deadline to 5 minutes.
hsanjuan Mar 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ os:
language: go

go:
- 1.7
- 1.9.2

install: true

script:
- make deps
- gx-go rewrite
- go test -race -coverprofile=unittest.coverprofile -covermode=atomic .
- go test -v -race -coverprofile=unittest.coverprofile -covermode=atomic .


after_success:
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ deps: gx
gx-go rewrite
go get -t ./...

rw:
gx-go rw

rwundo:
gx-go rw --undo
Loading