Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3082)

Issue 99580043: New GridFS storage for environment

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by wallyworld
Modified:
9 years, 11 months ago
Reviewers:
axw, mp+221315
Visibility:
Public.

Description

New GridFS storage for environment A new ResourceStorage interface is defined to provide Put/Get/Remove functionality for a specific storage implementation. A GridFS implementation is also provided which stores data in the "juju" database within a specified namespace. This is part of the Juju Internal Storage work. The next step is to maintain a catalog of the stored data to allow to dupe checks and querying. https://code.launchpad.net/~wallyworld/juju-core/environ-gridfs-stroage/+merge/221315 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : New GridFS storage for environment #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -0 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
A state/storage/gridfs.go View 1 1 chunk +75 lines, -0 lines 2 comments Download
A state/storage/gridfs_test.go View 1 chunk +119 lines, -0 lines 0 comments Download
A state/storage/interface.go View 1 chunk +20 lines, -0 lines 2 comments Download
A state/storage/package_test.go View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 5
wallyworld
Please take a look.
9 years, 11 months ago (2014-05-29 05:41:22 UTC) #1
axw
Looks pretty good, just a few questions/comments. https://codereview.appspot.com/99580043/diff/1/state/storage/gridfs.go File state/storage/gridfs.go (right): https://codereview.appspot.com/99580043/diff/1/state/storage/gridfs.go#newcode56 state/storage/gridfs.go:56: if err ...
9 years, 11 months ago (2014-05-29 06:05:04 UTC) #2
wallyworld
Please take a look. https://codereview.appspot.com/99580043/diff/1/state/storage/gridfs.go File state/storage/gridfs.go (right): https://codereview.appspot.com/99580043/diff/1/state/storage/gridfs.go#newcode56 state/storage/gridfs.go:56: if err != nil { ...
9 years, 11 months ago (2014-05-29 06:15:21 UTC) #3
axw
LGTM https://codereview.appspot.com/99580043/diff/20001/state/storage/gridfs.go File state/storage/gridfs.go (right): https://codereview.appspot.com/99580043/diff/20001/state/storage/gridfs.go#newcode69 state/storage/gridfs.go:69: return file.MD5(), nil Design says SHA256, but it's ...
9 years, 11 months ago (2014-05-29 06:28:43 UTC) #4
wallyworld
9 years, 11 months ago (2014-05-29 06:46:38 UTC) #5
https://codereview.appspot.com/99580043/diff/20001/state/storage/gridfs.go
File state/storage/gridfs.go (right):

https://codereview.appspot.com/99580043/diff/20001/state/storage/gridfs.go#ne...
state/storage/gridfs.go:69: return file.MD5(), nil
On 2014/05/29 06:28:43, axw wrote:
> Design says SHA256, but it's not clear to me if it actually matters (beyond
> likelihood of collisions).

Yeah, MD5 is cheaper and provided natively by GridFS.Its just to detect dupes so
it's sufficient. IMO

https://codereview.appspot.com/99580043/diff/20001/state/storage/interface.go
File state/storage/interface.go (right):

https://codereview.appspot.com/99580043/diff/20001/state/storage/interface.go...
state/storage/interface.go:15: // Put writes data from the specified reader to
path and returns a checksum of the data written.
On 2014/05/29 06:28:43, axw wrote:
> Does the client need to know how to recompute the checksum, for verification?
If
> so, I think the specific type of hash should be specified here.

I'm going to add a helper method to calculate the checksum (or similar feature)
when the de-dupe logic is implemented.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b