Commit Graph

29 Commits

Author SHA1 Message Date
JT Olio
3925e84580 pkg/eestream: plumb contexts through (#2187) 2019-06-26 16:05:58 +03:00
Kaloyan Raev
ebd9b375fc
Repair should not corrupt files (#2194) 2019-06-14 12:16:31 +03:00
JT Olio
9c5708da32 pkg/*: add monkit task to missing places (#2109) 2019-06-04 13:36:27 +02:00
ethanadams
268dc6b7e4
Enable gocritic linter (#2051)
* first round cleanup based on go-critic

* more issues resolved for ifelsechain and unlambda checks

* updated from master and gocritic found a new ifElseChain issue

* disable appendAssign. i reports false positives

* re-enabled go-critic appendAssign and disabled lint check at code line level

* fixed go-critic lint error

* fixed // nolint add gocritic specifically
2019-05-29 09:14:25 -04:00
Kaloyan Raev
d59c00b47c
Fix download error threshold (#1966) 2019-05-15 15:49:13 +03:00
Michal Niewrzal
a585b97363
Download is hanging when one node is not responsive (#1764)
Change closes download connection in parallel and sets a timeout for communication between uplink and storage node
2019-04-25 10:17:26 +02:00
Michal Niewrzal
991cbad66a
Fix download when missing piece (#1753) 2019-04-12 16:57:24 -04:00
Egon Elbre
de15a4fdcf
remove utils.CombineErrors and utils.ErrorGroup (#1603) 2019-03-29 14:30:23 +02:00
Kaloyan Raev
dd76829d10
Improve logic for cutting the long tail during upload (#909) 2019-02-05 12:54:25 +02:00
Jennifer Li Johnson
856b98997c
updates copyright 2018 to 2019 (#1133) 2019-01-24 15:15:10 -05:00
Egon Elbre
61632095e9
Flatten internal/pkg and remove unused internal/pkg/node (#526) 2018-10-25 11:24:39 +03:00
Kaloyan Raev
b34adc310b
Extract encryption package from eestream (#497) 2018-10-18 14:10:29 +03:00
Kaloyan Raev
f94c584768
Rename: DecodedBlockSize>StripeSize, EncodedBlockSize>ErasureShareSize (#392) 2018-09-27 14:52:18 +03:00
Kaloyan Raev
bc0f697929
Pointer stores only nodes with successfully uploaded pieces (#390) 2018-09-27 13:45:19 +03:00
Kaloyan Raev
ee5f32b0f7
ConcatRanger closes segment readers as soon as data is read (#349)
* ConcatRanger closes a segment readers as soon as data is read

* Fix linter errors

* Fix data race

* Nicer call to CombineErrors
2018-09-14 10:10:43 -04:00
Egon Elbre
0f5a2f4ef5 Enable more linters (#272)
* enable more linters

* Run gofmt -s

* run goimports

* run unconvert

* fix naked return

* fix misspellings

* fix ineffectual assigments

* fix missing declaration

* don't use deprecated grpc.Errof

* check errors in tests

* run gofmt -w -r "assert.Nil(err) -> assert.NoError(err)"

* fix directory permissions

* don't use nil Context

* simplify boolean expressions

* use bytes.Equal instead of bytes.Compare

* merge variable declarations, remove redundant returns

* fix some golint errors

* run goimports

* handle more errors

* delete empty TestMain

* delete empty TestMain

* ignore examples for now

* fix lint errors

* remove unused values

* more fixes

* run gofmt -w -s .

* add more comments

* fix naming

* more lint fixes

* try switching travis to go1.11

* fix unnecessary conversions

* fix deprecated methods

* use go1.10 and disable gofmt/goimports for now

* switch to 1.10

* don't re-enable gofmt and goimports

* switch covermode to atomic because of -race

* gofmt
2018-08-27 11:28:16 -06:00
Kaloyan Raev
7d1bd090f8
Optimize DecodeReader performance (#256)
* Optimize DecodeReader performance

* A little bit better locking in PieceBuffer.Write

* Fix race issues

* Better fix for race condition in rs_test.go

* Improve PieceBuffer.Read to read the max available in one call

* PieceBuffer.Skip for more efficient discarding of old shares

* Rename bytesRead to nn

* Notify cvNewData only if a complete new share is available

* Small correction in PieceBuffer.Read

* Rename some fields to have longer names
2018-08-24 16:06:27 +03:00
Kaloyan Raev
aac7c6fbd1
ECClient pads data to fit RS block size (#199) 2018-08-06 17:24:30 +03:00
Kaloyan Raev
d8f1ec1db6
ECClient (#110)
* WIP ECClient

* Get returns RangeCloser

* Introduce RedundancyStrategy

* Constructor takes max buffer memory

* Remove unnecessary NopCloser wrapper

* Added telemetry

* Tests

* Adapt to PSClient from master

* Decode should report error if empty rrs map is passed

* collectErrors helper

* Move to /pkg/storage

* Move to /pkg/storage/ec

* Rename ecclient.go to client.go

* Better logging

* Rename ec.ECClient to ec.Client

* Fix some test execution

* Adopt Transport Client from master
2018-07-03 11:35:01 +03:00
Kaloyan Raev
045dae5f0d
Add context to Ranger.Range method (#99) 2018-06-19 18:59:09 +03:00
Kaloyan Raev
7c8d6f8081
Add error to the return values of Ranger.Range method (#90)
* Add error to the return values of Ranger.Range method

* Addressing code review feedback

* Set Content-Type header only if ctype is not empty
2018-06-18 19:46:49 +03:00
Kaloyan Raev
ed72a5e542
Optimize eestream upload for slow piece storage nodes (#48)
* Buffered eestream EncodeReader

* Extracted fillBuffer() helper function

* Slow channels will be closed if there are still at least k fast channels

* Doc comment for maxBufferMemory

* Use timer more efficiently

* Timer initialization should be inside the for-loop

* Parallel copy of encoded data to reader buffer channels

* Transfer input read errors to output encoded readers

* minimum and optimum thresholds

* Use time.AfterFunc

* Simplify error handling in constructor
2018-05-30 18:27:09 +03:00
Kaloyan Raev
90ca28f7bc eestream avoid waiting for slow pieces (#30)
* WIP eestream avoid waiting for slow pieces

* Use non-blocking select to harvest all available inbufs

* Better way to check for elapsed time in tests

* Improve comment

* Determine EOF based on expected size

* Remove unused readerError type

* Configurable readers channel size

* Close properly decodedReader in tests

* Use context for properly closing the decodedReader

* Handle infectious errors using the new descendent classes

* Refactor decodedReader.Read() into helper functions

* Reenable TestRSErrors

* Test with Rangers

* Remove obsolete comment
2018-05-14 14:30:57 -06:00
Kaloyan Raev
1c56a4cf5c Decoder can tolerate readers with unexpected EOF and random data (#27)
* Decoder can tolerate readers with unexpected EOF

* Return EOF if required number of inbufs are at EOF

* Use existing randData() to generate random data for tests

* Test case for io.ErrUnexpectedEOF

* Add TransformReaderSize constructor
2018-05-04 14:52:49 -06:00
Kaloyan Raev
4635621a4d Move helper structs inside functions 2018-04-30 06:06:25 -06:00
Kaloyan Raev
acce2bfc08 Reduce network latency by initializing Rangers in parallel 2018-04-30 06:06:25 -06:00
Kaloyan Raev
69239e9e17 Do not fail decoding on first read error (#17)
* Do not fail decoding on first read error

Try decoding with the rest successfully read inputs.

* some small code improvements

* Allocate map memory upfront
2018-04-23 20:17:50 -06:00
Kaloyan Raev
f96cc9c955 HTTP Ranger (#11)
* HTTPRanger

* Migrate eestream library to use ReadCloser instead of Reader

* Use MultiReadCloser instead of MultiReader

* Adapt example cli cmds to latest serverbox changes

* Close LazyReadCloser only if only generated

* Close ReadClosers sequentially

* Close response body on unexpected status code

* Avoid double close of the pipe reader

* Better formatting for imports

* Exit instead of panicking
2018-04-17 07:39:14 -06:00
JT Olio
80fa10a06e pkg/eestream: initial 2018-04-11 07:46:34 -06:00