Actions
Task #2695
closedFeature #2620: Keep supports I/O locking
Review 2620-keep-serialize-io
Status:
Resolved
Priority:
Normal
Assigned To:
Tim Pierce
Category:
-
Target version:
Start date:
04/01/2014
Due date:
% Done:
0%
Estimated time:
2.00 h
Description
This is a very large code review. Here are some hints that may make it easier to understand what's going on here:
A Volume interface has been added to provide an abstraction layer for implementing any kind of storage device. The only Volume that has been implemented so far is a UnixVolume (a volume mounted as a local POSIX filesystem).
When Keep receives a GET
or PUT
request from a remote user, it invokes a Get or Put method on the appropriate Volume. The Volume is responsible for serializing any I/O requests if necessary.
Suggestions for review:
- First review
volume.go
, which describes the Volume interface and implements a MockVolume used for testing the front end. - It may help then to review
keep_test.go
, to see how the Volume interface is used in unit tests. - At that point, the changes in
keep.go
should be easier to understand: they chiefly change the Keep front-end to interact with the Volume interface rather than reading and writing files directly to disk. - The underlying UnixVolume type is implemented in volume_unix.go, including the code for managing any serialized I/O requests. volume_unix_test.go supplies unit tests.
Or, you know, review in whatever order makes sense to you. :-P
Actions