Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Last-write-wins (LWW) is a conflict-resolution rule, not a synchronization strategy. It can be appropriate when a value is safely replaceable, but it may discard a meaningful concurrent edit. An offline-first mobile app also needs a way to store and deliver queued changes, detect or define conflicts, choose an authority and merge unit, and recover from retries or delayed connections.

Choose conflict behavior from the meaning of each field and the loss your users can tolerate. If two offline edits can both be valid, do not let a whole-record LWW rule silently decide which one disappears.

What does last-write-wins mean?

With LWW, a system receives competing versions of the same data and keeps one according to its ordering rule. The other version is discarded. Martin Kleppmann and Alastair R. Beresford describe it plainly in their 2016 paper A Conflict-Free Replicated JSON Datatype: “The simplest way to resolve conflicts is to discard some modifications when a conflict occurs, for example using a ‘last writer wins’ policy.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Discarding a version is not automatically a problem. If a setting means “use the latest accepted choice,” replacing an earlier value may match the product’s intended behavior. But when both edits carry useful information, losing one is data loss—not merely a synchronization detail.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

The phrase “last” also depends on the implementation. A system might use timestamps or another ordering mechanism; do not assume that a device’s wall clock is authoritative just because a product describes its behavior as LWW. Clocks can be skewed or changed, and tie-breaking rules vary. Android’s offline-first guidance gives timestamp metadata as a conceptual example, not a universal endorsement of client clocks. Check the platform’s documented conflict mechanism.

Why is LWW not enough for offline-first sync?

While a device is disconnected, it can accept local reads and writes that differ from the network’s current state. When the connection returns, synchronization must reconcile those versions before the data can be brought back into alignment. Android Developers puts it this way: “If, when offline, the app writes data locally that is misaligned with the network data, you must resolve the conflict before synchronization can happen.” See its offline-first architecture guidance.

LWW answers only which competing version to keep. A working sync design also decides how changes are stored, delivered, retried, identified as duplicates, and reconciled with the data held by other replicas.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Choose a synchronization model

Android’s guidance describes three broad patterns. The right fit depends on how long users may be offline, whether the app must support offline writes, and what the product’s infrastructure can support.

  • Pull-based sync: Fetch relevant data when the app needs it. This can suit brief or intermediate periods without connectivity, but a long disconnection can leave local data stale or empty.
  • Push-based sync: Maintain a local replica and respond to notifications that data may be stale by fetching changes. This supports extended offline use, but requires more careful versioning and write handling.
  • Hybrid sync: Choose a pattern for each data type instead of forcing every kind of data into one model.

Make queued writes durable and safe to retry

For offline writes, plan how pending changes survive app restarts and how they are drained after reconnection. Android recommends queuing writes and retrying with exponential backoff; on Android, WorkManager is one common mechanism for persistent work. It is an Android mechanism, not a universal mobile solution.

Retries can deliver a change more than once, and delayed or reordered delivery can complicate reconciliation. Give operations an idempotent handling strategy so duplicate delivery does not accidentally apply the same action twice. Define what happens when a queued write cannot be accepted, and how the app reports or recovers from that outcome.

Rank #3
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

When can LWW lose a valid edit?

Consider an illustrative scenario: Device A goes offline and changes a task’s due date. Device B also goes offline and marks the task complete. If both devices upload whole-record snapshots and the system treats the entire record as one conflict unit, LWW may keep one snapshot and erase the other device’s change. A field-aware merge could preserve both edits if due date and completion have independent meanings. If the fields encode mutually exclusive choices, the app may instead need a domain rule or a person to decide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This is a design inference from overwrite behavior, not a claim that every database handles records this way. The key question is the conflict unit: does the system compare a field, a record, a list, or a whole document? A coarse unit can make independent edits compete unnecessarily. Use finer-grained semantics where the data model and product rules allow it.

Good candidates for LWW

LWW is easiest to justify when a value is genuinely replaceable and users expect one accepted value to supersede another—for example, a preference whose meaning is simply “the current choice.” State that behavior clearly and confirm that the implementation orders writes as intended.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Warning signs

  • Two users or devices can make useful changes to different parts of the same record while offline.
  • Discarding either change would violate a user expectation or an important business rule.
  • The data represents a collection, workflow, or set of related facts rather than one replaceable value.
  • The product has no way to detect, explain, or recover a lost update.

How do documented mobile sync products handle conflicts?

These product behaviors are examples, not rules for every sync system. Their documentation was accessed October 7, 2026; defaults and supported features can change, so confirm the current guidance for the platform and SDK you use.

Product Documented offline behavior Conflict behavior and scope
Cloud Firestore The SDK caches actively used data for offline reads, writes, listeners, and queries, then synchronizes local changes after reconnection. Persistence is enabled by default on Android and Apple platforms and disabled by default on web. Web persistence has browser and sensitive-data considerations. Multiple changes to the same document are resolved using LWW. The documentation also notes a limitation for Enterprise edition pipeline operations.
Couchbase Lite Its product documentation describes local offline data, cloud synchronization, and peer-to-peer options. Current Android conflict documentation describes LWW as the default update behavior and warns that an update can be overwritten and lost. An app can use failOnConflict to detect a conflict, reread, resolve, and retry, or provide a custom handler to merge document properties.

Read the platform-specific details in the Cloud Firestore offline persistence documentation, the Couchbase Lite Android conflict documentation, and the Couchbase Lite product introduction. A product’s default is a starting behavior, not proof that it matches your app’s data semantics.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What are the alternatives to LWW?

Conflict resolution can combine approaches. Pick the one that preserves the meaning of the data, rather than selecting a technique solely because it is convenient to implement.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Approach How it works When it can fit
Application- or domain-aware merge Apply rules based on what fields and operations mean; for example, preserve independent field changes or enforce a domain invariant. Use when the app can define a correct outcome more precisely than a generic overwrite rule.
Surface the conflict to a person Keep the competing versions available and let a user choose or edit the resolution. Use when neither automatic choice is safe and the user can make an informed decision.
Retain versions Keep competing states rather than immediately discarding one, so the app can present or resolve them later. Use when preserving edit history or enabling recovery matters more than choosing an immediate winner.
Conflict-free replicated data type (CRDT) Use a data type with defined merge semantics so replicas can converge despite delayed, reordered, or duplicate messages under the model’s assumptions. Use when the data type’s semantics fit the application and convergence is valuable; it does not decide every business rule.
Reject, reread, resolve, and retry Detect that the expected version changed, fetch current data, decide how to reconcile, and submit a new write. Use when an update should not silently overwrite a concurrent change and the app can retry safely.

What CRDTs do—and do not—guarantee

Kleppmann and Beresford’s 2016 paper presents a JSON CRDT with nested lists and maps, client-side merging, and no dependence on network ordering guarantees. Under its model, replicas can converge despite arbitrary delay, reordering, and duplication, assuming eventual message delivery with retries. The paper also addresses avoiding lost user input from concurrent modifications.

Convergence is not the same as a valid business outcome. A CRDT’s merge rules must fit the data type, and remaining conflicts at leaf values may still require program logic or user input. It does not automatically enforce every application invariant or decide which result users consider correct. The paper establishes algorithmic properties, not a broadly applicable performance benchmark or adoption statistic.

How should you choose a conflict policy?

Work through these decisions per entity or field. Different data in the same app may need different policies.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Define correctness. Write down what each field means and what should happen if two offline edits arrive. Identify any business invariant that must remain true.
  2. Check whether concurrent operations commute. If applying both operations in either order gives an acceptable result, a merge may fit. If they do not, decide whether to impose a domain rule, retain both versions, or ask a user.
  3. Choose an authority and conflict unit. Establish whether a central service or peers are authoritative for the data, and whether conflicts are evaluated per field, record, list, or document.
  4. Choose the least destructive suitable policy. Use LWW only for safely replaceable state. Otherwise consider domain-aware merging, version retention, conflict rejection and retry, or user resolution.
  5. Account for product constraints. Consider maximum offline duration, offline-write requirements, user expectations, bandwidth and battery, platform and SDK support, operational visibility and recovery, privacy, and security.

What should you test before shipping?

Test the synchronization behavior as a system, not just the merge function. Include the cases that exercise delivery, ordering, and recovery:

  • Two devices edit the same data while offline, including independent field edits and genuinely conflicting choices.
  • A device reconnects after a brief outage and after an extended offline period.
  • A write is retried, delivered twice, or arrives after a newer write.
  • The app or device stops while writes are queued, then restarts and resumes synchronization.
  • A deletion races with an edit; define whether and how a tombstone or other deletion marker is retained so an old replica does not simply restore removed data.
  • Device clocks are skewed or changed if the implementation uses timestamps to order writes.
  • The server rejects a write or reports a conflict, and the app must reread, resolve, retry, or explain the outcome.

For each case, verify both the final stored state and what the user sees. A system can technically converge while still losing information or presenting a result that violates product expectations.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.