<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Conflict-Resolution on IT Comparison</title><link>https://comparison.metacog.co.kr/tags/conflict-resolution/</link><description>Recent content in Conflict-Resolution on IT Comparison</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 06 Sep 2026 09:50:29 +0900</lastBuildDate><atom:link href="https://comparison.metacog.co.kr/tags/conflict-resolution/index.xml" rel="self" type="application/rss+xml"/><item><title>Last-Write-Wins vs Merging: Resolving Conflicting Writes</title><link>https://comparison.metacog.co.kr/posts/2026-09-06-last-write-wins-vs-merging-resolving-conflicting-writes/</link><pubDate>Sun, 06 Sep 2026 09:50:29 +0900</pubDate><guid>https://comparison.metacog.co.kr/posts/2026-09-06-last-write-wins-vs-merging-resolving-conflicting-writes/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;When two replicas accept concurrent writes to the same key, a system must reconcile them. &lt;strong class="kw"&gt;Last-Write-Wins&lt;/strong&gt; picks a single winner by timestamp and discards the rest, while &lt;strong class="kw"&gt;Merging&lt;/strong&gt; combines both writes into a new value using domain-specific or CRDT logic.&lt;/p&gt;
&lt;h2 id="comparison-diagram"&gt;Comparison Diagram&lt;/h2&gt;
&lt;div class="compare-diagram"&gt;
&lt;svg viewBox="0 0 640 360" xmlns="http://www.w3.org/2000/svg"&gt;&lt;line x1="320" y1="20" x2="320" y2="340" style="stroke:var(--border)" stroke-width="1" stroke-dasharray="4 4"/&gt;&lt;text x="160" y="30" text-anchor="middle" style="fill:var(--primary)" font-size="16" font-weight="bold"&gt;Last-Write-Wins&lt;/text&gt;&lt;text x="480" y="30" text-anchor="middle" style="fill:var(--primary)" font-size="16" font-weight="bold"&gt;Merging&lt;/text&gt;&lt;rect x="40" y="55" width="110" height="45" rx="4" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="95" y="75" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;Write A&lt;/text&gt;&lt;text x="95" y="91" text-anchor="middle" style="fill:var(--secondary)" font-size="10"&gt;t=10, val=1&lt;/text&gt;&lt;rect x="170" y="55" width="110" height="45" rx="4" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="225" y="75" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;Write B&lt;/text&gt;&lt;text x="225" y="91" text-anchor="middle" style="fill:var(--secondary)" font-size="10"&gt;t=12, val=2&lt;/text&gt;&lt;line x1="95" y1="100" x2="160" y2="150" style="stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;line x1="225" y1="100" x2="160" y2="150" style="stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;circle cx="160" cy="155" r="5" style="fill:var(--compare-a)"/&gt;&lt;line x1="160" y1="160" x2="160" y2="200" style="stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;rect x="90" y="205" width="140" height="50" rx="4" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="2"/&gt;&lt;text x="160" y="227" text-anchor="middle" style="fill:var(--content)" font-size="12" font-weight="bold"&gt;val = 2&lt;/text&gt;&lt;text x="160" y="243" text-anchor="middle" style="fill:var(--secondary)" font-size="10"&gt;(highest timestamp wins)&lt;/text&gt;&lt;text x="160" y="280" text-anchor="middle" style="fill:var(--secondary)" font-size="10"&gt;Write A silently discarded&lt;/text&gt;&lt;rect x="360" y="55" width="110" height="45" rx="4" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="415" y="75" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;Write A&lt;/text&gt;&lt;text x="415" y="91" text-anchor="middle" style="fill:var(--secondary)" font-size="10"&gt;t=10, val=1&lt;/text&gt;&lt;rect x="490" y="55" width="110" height="45" rx="4" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="545" y="75" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;Write B&lt;/text&gt;&lt;text x="545" y="91" text-anchor="middle" style="fill:var(--secondary)" font-size="10"&gt;t=12, val=2&lt;/text&gt;&lt;line x1="415" y1="100" x2="480" y2="150" style="stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;line x1="545" y1="100" x2="480" y2="150" style="stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;circle cx="480" cy="155" r="5" style="fill:var(--compare-b)"/&gt;&lt;line x1="480" y1="160" x2="480" y2="200" style="stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;rect x="405" y="205" width="150" height="50" rx="4" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="2"/&gt;&lt;text x="480" y="227" text-anchor="middle" style="fill:var(--content)" font-size="12" font-weight="bold"&gt;{A:1, B:2}&lt;/text&gt;&lt;text x="480" y="243" text-anchor="middle" style="fill:var(--secondary)" font-size="10"&gt;(both values combined)&lt;/text&gt;&lt;text x="480" y="280" text-anchor="middle" style="fill:var(--secondary)" font-size="10"&gt;No data lost, app may reconcile&lt;/text&gt;&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id="comparison-table"&gt;Comparison Table&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Last-Write-Wins&lt;/th&gt;
&lt;th&gt;Merging&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Conflict trigger&lt;/td&gt;
&lt;td&gt;Fires when two writes to the same key arrive with overlapping validity, regardless of content&lt;/td&gt;
&lt;td&gt;Fires the same way, but treats both writes as valid inputs rather than competitors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resolution mechanism&lt;/td&gt;
&lt;td&gt;Compares timestamps (or version numbers) and keeps the highest one&lt;/td&gt;
&lt;td&gt;Applies a merge function, CRDT join, or three-way diff to combine both values&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data/metadata required&lt;/td&gt;
&lt;td&gt;A reliable clock or monotonic counter per write&lt;/td&gt;
&lt;td&gt;Version vectors, causal history, or a semantically defined merge operation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Application involvement&lt;/td&gt;
&lt;td&gt;None — resolution is automatic and content-agnostic&lt;/td&gt;
&lt;td&gt;Requires the app or data structure to define what &amp;lsquo;combining&amp;rsquo; means&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Outcome for the losing write&lt;/td&gt;
&lt;td&gt;Discarded entirely, no trace remains&lt;/td&gt;
&lt;td&gt;Incorporated into the final merged state, nothing is dropped&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consistency guarantee&lt;/td&gt;
&lt;td&gt;Deterministic convergence, but the winner may be arbitrary relative to causality&lt;/td&gt;
&lt;td&gt;Deterministic convergence that also respects the semantics of both updates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance overhead&lt;/td&gt;
&lt;td&gt;Minimal — a single comparison per conflict&lt;/td&gt;
&lt;td&gt;Higher — merge logic, extra metadata, and sometimes multi-way comparisons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Failure mode&lt;/td&gt;
&lt;td&gt;Silent data loss under clock skew or concurrent writes at the same timestamp&lt;/td&gt;
&lt;td&gt;Unresolvable merge conflicts that surface to the application or user&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="key-differences"&gt;Key Differences&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;LWW resolves conflicts purely by comparing &lt;strong class="kw"&gt;timestamps&lt;/strong&gt;, keeping only one write.&lt;/li&gt;
&lt;li&gt;Merging combines concurrent writes using a &lt;strong class="kw"&gt;merge function&lt;/strong&gt; or CRDT join instead of picking a single winner.&lt;/li&gt;
&lt;li&gt;LWW can cause &lt;strong class="kw"&gt;silent data loss&lt;/strong&gt; when clocks skew or writes race within the same tick.&lt;/li&gt;
&lt;li&gt;Merging needs &lt;strong class="kw"&gt;semantic knowledge&lt;/strong&gt; of the data type to combine values correctly.&lt;/li&gt;
&lt;li&gt;LWW adds negligible overhead per write; merging trades that simplicity for &lt;strong class="kw"&gt;correctness&lt;/strong&gt; under concurrency.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="when-to-use-each"&gt;When to Use Each&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Last-Write-Wins&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>