You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To account for replication lag in "read-after-write" scenarios in kysely, I wonder if there is a way to expose something similar to the useMaster option in a kysely query to the underlying sequelize instance. This would help migrate code from Sequelize to kysely while preserving its current behavior.
Is this feasible, Im interested to hear thoughts on an approach as i look into it myself. If so I can contribute to the implementation. Please advice at your convenience.
Thanks in advance!
The text was updated successfully, but these errors were encountered:
ianjkaplan
changed the title
Support primary database reads
Support primary database reads from a Kysely query
Sep 14, 2024
ianjkaplan
changed the title
Support primary database reads from a Kysely query
Support primary database reads from a kysely query in a replicated configuration
Sep 14, 2024
ianjkaplan
changed the title
Support primary database reads from a kysely query in a replicated configuration
Support sequelize query option from a kysely query
Sep 14, 2024
In a replicated configuration, sequelize supports overriding the default behavior where reads go to a replica and writes go to the primary.
https://sequelize.org/docs/v6/other-topics/read-replication/
This behavior is supported through the
QueryOptions
type. https://sequelize.org/api/v7/interfaces/_sequelize_core.index.queryoptionsIt looks like the sequelize query options are not exposed to the caller when executing a kysely query.
To account for replication lag in "read-after-write" scenarios in kysely, I wonder if there is a way to expose something similar to the
useMaster
option in a kysely query to the underlying sequelize instance. This would help migrate code from Sequelize to kysely while preserving its current behavior.Is this feasible, Im interested to hear thoughts on an approach as i look into it myself. If so I can contribute to the implementation. Please advice at your convenience.
Thanks in advance!
The text was updated successfully, but these errors were encountered: