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

fixes some memory and concurrency bugs in gbucket #135

Merged
merged 3 commits into from
Mar 11, 2016
Merged

fixes some memory and concurrency bugs in gbucket #135

merged 3 commits into from
Mar 11, 2016

Conversation

stephenplaza
Copy link
Contributor

This change is Review on Reviewable

@DocSavage
Copy link
Member

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.


datatype/imageblk/write.go, line 379 [r1] (raw file):
It looks like not all errors are logged on the PutCallback() so we should have a dvid.Errorf() or dvid.Criticalf() here.


Comments from the review on Reviewable.io

@stephenplaza
Copy link
Contributor Author

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.


datatype/imageblk/write.go, line 379 [r1] (raw file):
Looking at your old code, does this mean that a post can fail and an error message is produced but the actually calling function is unaware of failure? I don't see the error returned from PutChunk being used in the original code.


Comments from the review on Reviewable.io

@DocSavage
Copy link
Member

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.


datatype/imageblk/write.go, line 379 [r1] (raw file):
Yes. I'm not sure the best way to handle errors in asynchronous other than logging them. For example, if someone deletes a data instance, it spawns a goroutine to do the potentially long deletion but returns immediately with a 200 saying it's started the deletion. At that point, there is no more connection with the client. In the case of a POST subvolume, it is synchronous from the client so there should be an error channel instead of just a sync.WaitGroup. But currently, it's just treated like what you are doing here -- spawn a goroutine and log an error if there is one.


Comments from the review on Reviewable.io

@DocSavage
Copy link
Member

Reviewed 2 of 3 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from the review on Reviewable.io

DocSavage added a commit that referenced this pull request Mar 11, 2016
fixes some memory and concurrency bugs in gbucket
@DocSavage DocSavage merged commit 2687646 into janelia-flyem:master Mar 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants