<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="376628" data-post-id="376628">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tfwright" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tfwright/120/20299_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tfwright
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="garrison" data-post="20" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/3bc359/48.png" class="avatar"> garrison:</div>
<blockquote>
<p>Unit tests are probably better for situations where a large number of mediocre tests can cover a large API surface area which is unlikely to have deep bugs.</p>
<p>But, like, they’re still <em>inferior</em>. You’re just “getting away with it” there.</p>
</blockquote>
</aside>
<p>Just lurking because minimal to 0 relevant experience but love an ambitious project. But I couldn’t stand by to let unit tests be slandered like this.  inferior?? come on, they’re a trade-off. you give: moderate extra time specifying input and outputs for a small piece of your API. you receive: assistance designing said api and a fairly strong guarantee future implementation changes don’t break the contract. refactorer’s best friend. This is especially true with web apps where true e2e tests are a huge pain.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376628" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/hobbes-a-low-level-distributed-database-for-the-elixir-programming-language/73003/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-376628" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376628"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="376630" data-post-id="376630">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sodapopcan" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sodapopcan/120/34668_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sodapopcan
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think this may be the classic case of people having different ideas of what the “unit” is.  The type of granular tests I’m considering unit tests are the enemy of refactoring.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376630" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/hobbes-a-low-level-distributed-database-for-the-elixir-programming-language/73003/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-376630" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376630"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="376632" data-post-id="376632">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I had a bug not long ago where one of the fuzzers tripped an assert. Not often, maybe 1-5% of the sim runs failed.</p>
<p>The distributor writes special meta keys into the sharded WAL to inform the storage servers they need to change their shard map and/or fetch keyspace from another server. These special mutations are logged at a particular version (it’s a multiversion database) because they have to happen at exactly the right time. They are pushed from the Distributor, to a CommitBuffer to be batched, and then they are fragmented and shipped to the sharded WAL (TLog servers). The Storage server pulls batches from the TLog servers with a peek call. All of this is distributed and nondeterministic, including how things end up being batched on the CommitBuffer and how those batches are pulled by the Storage server.</p>
<p>When the Storage server applies the batches, it does so one batch at a time. Within the batch it applies one mutation at a time. It can pull a few batches at a time from the TLogs, so this is a nested loop, essentially.</p>
<p>To observe the special mutations, the Storage server has to diff the new value with the previous value, so it has to read the previous value and then run them both through a case statement so that it can discover what to do. For example, if the previous value was <code>nil</code> and the new value was a shard key, it would be a command to fetch that shard. And the inverse, and so on. Some combinations would be impossible because they have no semantic meaning (like <code>nil</code> → <code>nil</code>). I am speedrunning this explanation, obviously.</p>
<p>There was a bug in this code. In the second level of the nested loop, I accidentally read the old key at the current <code>version</code> of the Storage server rather than the <code>version</code> being applied currently; i.e. at the wrong level of the nested loop.</p>
<p>This led to a very rare edge case: if the meta mutations were batched just right, there would be two for the same key within the set of batches that happened to be pulled by the Storage server from the TLogs. This is <em>impossibly</em> unlikely in practice because the same meta key would almost never be written multiple times this way. But if the stars aligned, the diff might “miss” a value in between the batches.</p>
<p>The fuzzer that caught this aggressively spams shard moves against the cluster. Even then, only a few runs tripped the assert, because the stars had to align to make it happen. This would be <em>very</em> nondeterministic, but thankfully I spent months reimplementing half of OTP deterministically so that I don’t have to deal with flaky simulator runs.</p>
<p><a href="https://git.sr.ht/~garrisonc/hobbes/commit/5903a98095f7d92e475dce8f906cee45d0a337e6" rel="noopener nofollow ugc">It was a one-line fix</a>.</p>
<p>Can you write a unit test to prevent this bug?</p>
<p>Actually, do you think you could even write a <em>regression</em> test for this bug?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376632" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/hobbes-a-low-level-distributed-database-for-the-elixir-programming-language/73003/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-376632" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376632"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="376633" data-post-id="376633">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="tfwright" data-post="22" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tfwright/48/20299_2.png" class="avatar"> tfwright:</div>
<blockquote>
<p>This is especially true with web apps where true e2e tests are a huge pain.</p>
</blockquote>
</aside>
<p>Have you considered that perhaps the fact that they’re a pain is the problem we should be looking into?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376633" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/hobbes-a-low-level-distributed-database-for-the-elixir-programming-language/73003/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-376633" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376633"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="376634" data-post-id="376634">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tfwright" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tfwright/120/20299_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tfwright
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-modified" data-username="garrison" data-post="24" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/3bc359/48.png" class="avatar"> garrison:</div>
<blockquote>
<p>I had a bug not long ago where one of the fuzzers tripped an assert….</p>
</blockquote>
</aside>
<p>That’s all super interesting. Genuinely! That’s the kind of stuff I’m in this thread for. But unit tests have their place. Maybe not in your project.</p>
<aside class="quote no-group" data-username="garrison" data-post="25" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/3bc359/48.png" class="avatar"> garrison:</div>
<blockquote>
<p>Have you considered that perhaps the fact that they’re a pain is the problem we should be looking into?</p>
</blockquote>
</aside>
<p>Me? uh, no. i’ve got….other stuff. But sure, I have no doubt they can be improved and will be. LiveView test is a huge improvement over other JS based frameworks (though that is….not saying much). Just there’s no way around the fact it’s more complex, and unless we want to imagine a scenario where the complexity differential is approaching 0, which is certainly <em>not</em> present day, unit tests provide huge value for the cost.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376634" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/hobbes-a-low-level-distributed-database-for-the-elixir-programming-language/73003/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-376634" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376634"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #25"></div>
  </section>
</div>
    <div class="postbit" id="376635" data-post-id="376635">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Asd" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Asd
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi, it’s a good DB, I’ve read almost all of the storage and transactions code (except the constructor) and I find it much easier to read than other databases! Here are my questions:</p>
<hr>
<p>From README</p>
<blockquote>
<p>Hobbes will be closed to public contribution for the foreseeable future.</p>
</blockquote>
<p>Why? Can I participate <img src="https://forum.elixirforum.com/images/emoji/apple/backhand_index_pointing_right.png?v=15" title=":backhand_index_pointing_right:" class="emoji" alt=":backhand_index_pointing_right:" loading="lazy" width="20" height="20"> <img src="https://forum.elixirforum.com/images/emoji/apple/backhand_index_pointing_left.png?v=15" title=":backhand_index_pointing_left:" class="emoji" alt=":backhand_index_pointing_left:" loading="lazy" width="20" height="20"> with some PRs please?</p>
<hr>
<blockquote>
<p>Hobbes is currently proprietary as it is not intended for public use.</p>
</blockquote>
<p>You’re missing a LICENSE file though. Copyright must declare an owner at least</p>
<hr>
<p>From <code>architecture/overview.md</code></p>
<blockquote>
<p>Hobbes was designed and built by Corporate to meet our unique needs.</p>
</blockquote>
<p>What Corporate? Is it a name of the place you work at? <a href="https://corporate.fm" rel="noopener nofollow ugc">https://corporate.fm</a> ?<br>
“our”? How many people are working on the project? Just curious.</p>
<hr>
<p>As far as I can see, the storage path works like this:</p>
<ol>
<li>Mutation gets into MutationLog</li>
<li>HybridKV pop from mutation log on flush</li>
<li>This data is inserted into storage kv during flush</li>
<li>Storage kv is dumped on disk during commit during flush</li>
</ol>
<p>And I see these problems:</p>
<ol>
<li>Mutation log is in-memory, if it dies, data is lost</li>
<li>Storage kv always keeps everything in memory, never reduces size</li>
<li>Full kv dump is async</li>
<li>Full kv dump is slow</li>
<li>In case something fails, transaction is lost and user is not notified about it</li>
</ol>
<p>I know that this is work in progress, so I am interested in the approach you’re planning to take for storage part. Is it going to be a B-tree variation or maybe some LSM or some new approach?</p>
<hr>
<p>Looks like it’s not going to support arbitrary terms as keys. Why?</p>
<p><em>Don’t tell me about <code>term_to_binary</code> ordering, I wrote a <code>nanolsm</code> just to prove that storage can have arbitrary terms as keys with range reads and everything</em></p>
<hr>
<p>I wrote a thing similar to <code>Construct</code>, but it’s a WIP thing, so I haven’t released it yes, and it uses a similar API, but slightly different approach. Instead of fuzzing, it traverses <strong>all possible paths</strong> of how things can happen in distributed system (with or without failures).</p>
<p>Idea behind it is this: we form a tree, where each node is a set of actions (like “send this message to some process” or “receive this message in this process” or “unblock this process after send”, etc.) which can happen at some moment, and the edge is the action which is executed which leads us to the new set of actions. Root node is formed when all tracked processes are stuck in checkpoints (like after send or right after spawn, etc.). When we execute some action, we move down this tree. And each new run is trying to traverse the new path of the tree (starting from root).</p>
<p>The main problem with this library is the action tree increasing in size, since even simple <code>GenServer.call</code> can lead to many outcomes.</p>
<p>I can upload the code if you want to see it.</p>
<hr>
<p>I’ll ask more questions once I finish reading and testing it</p>
<hr>
<p>Congrats on the initial release, I can see in git history that it took one and half years and it’s a lot of progress in this amount of time. Frankly, I am almost jealous (in a good way) of your productivity <img src="https://forum.elixirforum.com/images/emoji/apple/smile.png?v=15" title=":smile:" class="emoji" alt=":smile:" loading="lazy" width="20" height="20"> . I can’t wait to see newer iterations of the project.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376635" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/hobbes-a-low-level-distributed-database-for-the-elixir-programming-language/73003/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-376635" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376635"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #26"></div>
  </section>
</div>
    <div class="postbit" id="376636" data-post-id="376636">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="garrison" data-post="25" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/3bc359/48.png" class="avatar"> garrison:</div>
<blockquote>
<p>Have you considered that perhaps the fact that they’re a pain is the problem we should be looking into?</p>
</blockquote>
</aside>
<p>Who is “we”?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376636" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/hobbes-a-low-level-distributed-database-for-the-elixir-programming-language/73003/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-376636" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376636"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #27"></div>
  </section>
</div>
    <div class="postbit" id="376690" data-post-id="376690">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Asd" data-post="27" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>Hi, it’s a good DB</p>
</blockquote>
</aside>
<p>An honor!</p>
<aside class="quote no-group" data-username="Asd" data-post="27" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>Why? Can I participate</p>
</blockquote>
</aside>
<p>Many different reasons, but for now this is a “just me” thing. Maybe down the road when I have self-hosted Git infra (really hoping ATProto works out) I would consider accepting contributions from a small number of trusted people, if those people are willing to follow some rules. For the time being I don’t want to worry about it.</p>
<aside class="quote no-group" data-username="Asd" data-post="27" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>Copyright must declare an owner at least</p>
</blockquote>
</aside>
<p>This is not true (copyright is automatic), but it won’t matter once we move to alpha because then there won’t be any copyright <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="Asd" data-post="27" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>What Corporate?</p>
</blockquote>
</aside>
<p>It’s just me for now! “Our” is being used in a professional sense to reflect that I consider this to be the work of an organization, even if that organization is <em>currently</em> just me. There will be commercial products in the future; Hobbes is part of the tooling I’m building out to support those products. I am very interested in sovereignty.</p>
<p>And yes that is my (“Our”) website, which is currently just a blog. Which I will be posting to more regularly now, so grab the RSS if you’re interested in that!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376690" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/hobbes-a-low-level-distributed-database-for-the-elixir-programming-language/73003/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-376690" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376690"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #28"></div>
  </section>
</div>
    <div class="postbit" id="376693" data-post-id="376693">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Asd" data-post="27" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>Instead of fuzzing, it traverses <strong>all possible paths</strong> of how things can happen in distributed system</p>
</blockquote>
</aside>
<p>This sounds cool and of course I’d love to see it <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>Traversing all reachable paths in a breadth-first way like this would probably prevent you from reaching bugs that only occur after some time has elapsed. The fuzzers are essentially traversing depth-first with a lot of noise injected, if you think about it. Good for finding bugs.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376693" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/hobbes-a-low-level-distributed-database-for-the-elixir-programming-language/73003/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-376693" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376693"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #29"></div>
  </section>
</div>
    <div class="postbit" id="376696" data-post-id="376696">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Asd" data-post="27" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>As far as I can see, the storage path works like this</p>
</blockquote>
</aside>
<p>Your understanding looks correct. This design comes right from FoundationDB, where the in-memory state is multiversion and the on-disk state is not (hence the MVCC window of roughly 5 seconds).</p>
<p>However, I am going to obsolete this entire thing by pushing the MVCC all the way down into the storage engine on disk, at which point this entire path is going to be removed! So enjoy it while you can, I guess.</p>
<aside class="quote no-group" data-username="Asd" data-post="27" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>Mutation log is in-memory, if it dies, data is lost</p>
</blockquote>
</aside>
<p>The WAL data is stored durably on the TLogs and would simply be pulled again after the Storage server reboots. The WAL is not popped from TLogs until after it is persisted by the Storage server.</p>
<aside class="quote no-group" data-username="Asd" data-post="27" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>Storage kv always keeps everything in memory, never reduces size</p>
</blockquote>
</aside>
<p>Because there is no on-disk storage engine; it’s essentially mocked for sim testing. The flat storage <em>would</em> be on-disk. The in-memory storage is pruned by the flush and would not grow unbounded.</p>
<aside class="quote no-group" data-username="Asd" data-post="27" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>Full kv dump is async</p>
</blockquote>
</aside>
<p>I’m not sure what you’re referring to exactly, but if you mean <code>FlatStorageKV</code> this is a mock to test recovery after restarts. It’s not a real storage engine. I was going to write another KV using SQLite (this would be trivial) but I changed my mind and started designing one from scratch.</p>
<aside class="quote no-group" data-username="Asd" data-post="27" data-topic="73003">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>In case something fails, transaction is lost and user is not notified about it</p>
</blockquote>
</aside>
<p>This could mean a lot of different things. Can you clarify?</p>
<p>A committed transaction would <em>never</em> be lost. Unless fault-tolerance is violated, at which point the database should be considered lost and restored from backup.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376696" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/hobbes-a-low-level-distributed-database-for-the-elixir-programming-language/73003/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-376696" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376696"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/73003/load_more?page=4">Load more posts (56 remaining)</a>
</div></template></turbo-stream>