Skip to content

[BUG[: Model has a small possibility because of replication latency. #17105

@ifsnow

Description

@ifsnow

I think it's a low priority issue.
but, we should know the possibility of an unintended result.

_exists() function always executes before create() or save() function in Model.

_exists() function => use read connection.
save() function => use write connection.

There may be long latency to replicate between master and slave servers.
We can't be guaranteed that slave servers always are same as master server.
It could be a bit problematic in high transaction.

In my opinion, you'd better use write connection intead of read connection in _exists() function.

Metadata

Metadata

Assignees

Labels

5.0The issues we want to solve in the 5.0 releasebugA bug reportstatus: mediumMedium

Type

No fields configured for Bug.

Projects

Status
Implemented

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions