realm-js icon indicating copy to clipboard operation
realm-js copied to clipboard

Realm write race condition

Open ryan-mardiono-sal opened this issue 1 year ago • 0 comments

Does realm handle possible conflicting attempts at multiple realm write transactions at the same time?

Of course I'm aware not to intentionally do more than 1 realm write transaction at once. But what happens in this example?:

  • Interval that writes and creates realm object every minute
  • Button to create the object

If they happen to coincide, would realm handle this? I've seen in swift some people create safeWrite function which checks for this. But it was bit outdated.

Appreciate any info on this, thanks.

ryan-mardiono-sal avatar Jan 30 '25 04:01 ryan-mardiono-sal