amplab/tachyon — pull request #127 by aarondav (2014-02-17 04:05:03+00:00)
Title: [RFC] Add "cacheOnRead" setting for file inodes

This setting allows a user to specify a "cacheOnRead" setting for an inode, which is respected when the file is read via ReadType.DEFAULT. The use-case here is when the writer of the file wants to declare the file to be cache-friendly or cache-avoiding, and the reader is content to accept whatever choice was made.

This approach actually adds a field to the InodeFile, which is admittedly rather invasive but does allow us to integrate easily into the WAL. The option as specified here is optional and defaults to true. I have tried to avoid removing or modifying any external APIs.

One big shortcoming of this approach is that it is not currently possible to modify the property after inode creation; this would simply require a new WAL entry type and a new RPC.

(Note that this PR is in a RFC stage -- I am hoping to get feedback on the best way of accomplishing this in Tachyon. If the current approach is suitable, I will clean up the PR and submit it for real.)