|
|
About
TODO
Blog
RSS
Old blog
Projects
Gallery
Notes
Tue, 29 Apr 2008
POHMELFS transactions and ACID.
POHMELFS
just got initial transactions support and ability to connect to multiple master servers.
Master servers are those, which will say, where data is placed. Essentially
they are the same severs which may provide that data, but main server addresses are
provided during pre-mount configuration time, and data server addresses will be provided
by main servers (if main ones will not want to return data) in run-time.
Also main servers can be used to request data in parallel or to switch between them,
when curently active one has failed.
So far it is a theory, practice is rather miserable: POHMELFS client connects to
multiple servers, but works with only one. Errors are detected, and switch to the next
server can happen, but it is not done. Since there is a serious problem with this
approach: neither server nor client support
ACID for data being written.
Here we come to transaction introduction: it is multiple commands wrapped into
single atomic operation. In case of error during transaction
write, the whole one will be resent to different server (or the same one after reconnect).
This is rather simple (although transactions are not supported by server and client
does not wrap any command into it yet), but it still does not solve ACID problem.
Since POHMELFS has writeback cache, all its writes never reach server, instead writeback
is scheduled by the system, and it starts writing pages to the server. Current POHMELFS implementation
uses only ->writepage() method, which is invoked for each page.
It does not require server to return explicit acknowledge, that page was written,
instead it relies to underlying transport protocol (like TCP) to handle guaranteed delivery,
so data can be queued somewhere when connection was dropped, so POHMELFS client
does not know if data was really written or not. Having per-page acknowledge can fix
ACID problem realy trivially, but that may (or may not) end up with severe performance
degradataion. As a better solution I consider own ->writepages()
implementation, where each transaction will contain multiple pages to be written
and thus smaller amount of explicit acks from server to be received, and thus smaller performance
degradataion. In case of failure whole transaction has to be resent to different server of
course.
Server does not support data mirroring to multiple root directories yet, so actually
not too much is implemented from above description, but transactions and multiple
server connections exist and soon client will get support for reconnection and proper
transaction processing.
/devel/fs :: Link / Comments (0)
Please solve this captcha to be allowed to post (need to reload in a minute): 53 * 23
|