<html><body><div style="font-family: garamond,new york,times,serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Vijay Bellur" &lt;vbellur@redhat.com&gt;<br><b>To: </b>"Krutika Dhananjay" &lt;kdhananj@redhat.com&gt;<br><b>Cc: </b>"Gluster Devel" &lt;gluster-devel@gluster.org&gt;<br><b>Sent: </b>Tuesday, February 24, 2015 11:35:28 AM<br><b>Subject: </b>Re: [Gluster-devel] Sharding - Inode write fops - recoverability from failures - design<br><div><br></div>On 02/24/2015 10:36 AM, Krutika Dhananjay wrote:<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; &nbsp; &nbsp; *From: *"Vijay Bellur" &lt;vbellur@redhat.com&gt;<br>&gt; &nbsp; &nbsp; *To: *"Krutika Dhananjay" &lt;kdhananj@redhat.com&gt;, "Gluster Devel"<br>&gt; &nbsp; &nbsp; &lt;gluster-devel@gluster.org&gt;<br>&gt; &nbsp; &nbsp; *Sent: *Monday, February 23, 2015 5:25:57 PM<br>&gt; &nbsp; &nbsp; *Subject: *Re: [Gluster-devel] Sharding - Inode write fops -<br>&gt; &nbsp; &nbsp; recoverability from failures - design<br>&gt;<br>&gt; &nbsp; &nbsp; On 02/22/2015 06:08 PM, Krutika Dhananjay wrote:<br>&gt; &nbsp; &nbsp; &nbsp;&gt; Hi,<br>&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt; &nbsp; &nbsp; &nbsp;&gt; Please find the design doc for one of the problems in sharding which<br>&gt; &nbsp; &nbsp; &nbsp;&gt; Pranith and I are trying to solve and its solution @<br>&gt; &nbsp; &nbsp; &nbsp;&gt; http://review.gluster.org/#/c/9723/1.<br>&gt; &nbsp; &nbsp; &nbsp;&gt; Reviews and feedback are much appreciated.<br>&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; Can this feature be made optional? I think there are use cases like<br>&gt; &nbsp; &nbsp; virtual machine image storage, hdfs etc. where the number of metadata<br>&gt; &nbsp; &nbsp; queries might not be very high. It would be an acceptable tradeoff in<br>&gt; &nbsp; &nbsp; such cases to not be very efficient for answering metadata queries but<br>&gt; &nbsp; &nbsp; be very efficient for data operations.<br>&gt;<br>&gt; &nbsp; &nbsp; IOW, can we have two possible modes of operation for the sharding<br>&gt; &nbsp; &nbsp; translator to answer metadata queries?<br>&gt;<br>&gt; &nbsp; &nbsp; 1. One that behaves like a regular filesystem where we expect a mix of<br>&gt; &nbsp; &nbsp; data and metadata operations. Your document seems to cover that part<br>&gt; &nbsp; &nbsp; well. We can look at optimizing behavior for multi-threaded single<br>&gt; &nbsp; &nbsp; writer use cases after an initial implementation is in place.<br>&gt; &nbsp; &nbsp; Techniques<br>&gt; &nbsp; &nbsp; like eager locking can be applied here.<br>&gt;<br>&gt; &nbsp; &nbsp; 2. Another mode where we do not expect a lot of metadata queries. In<br>&gt; &nbsp; &nbsp; this mode, we can visit all nodes where we have shards to answer these<br>&gt; &nbsp; &nbsp; queries.<br>&gt;<br>&gt; But for sharding translator to be able to visit all shards, it is<br>&gt; required to know the last shard number.<br>&gt; Without this, it will never know when to stop looking up the different<br>&gt; shards. For this to happen, we<br>&gt; still need to maintain the size attribute for each file.<br>&gt;<br><div><br></div>Wouldn't maintaining the total number of shards in the metadata shard be <br>sufficient?</blockquote><div>Maintaining the correctness of "total number of shards" would again incur the same cost as maintaining size or any other metadata attribute if a client/brick crashes in the middle of a write fop before the attribute is committed to disk.</div><div>In other words, we will again need to maintain a "dirty" and "committed" copy of the shard_count to ensure its correctness.</div><div><br></div><div>-Krutika</div><div><br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><br><div><br></div>-Vijay<br><div><br></div></blockquote><div><br></div></div></body></html>