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
If your Sequelize setup uses read replicas, there can be a lag between writes (e.g. calling `enable`) and subsequent reads on a replica. To guarantee read-after-write consistency for Flipper operations, construct the adapter with `useMaster: true` which passes `useMaster` to all Sequelize `find` queries, ensuring they target the primary connection.
104
+
105
+
```typescript
106
+
const adapter =newSequelizeAdapter({
107
+
Feature: models.Feature,
108
+
Gate: models.Gate,
109
+
useMaster: true, // force reads to primary DB
110
+
})
111
+
```
112
+
113
+
Default is `false`, allowing replicas to serve reads. Enable this only where strict consistency is required (e.g. synchronous feature toggling during a request lifecycle).
114
+
101
115
## API surface
102
116
103
117
The adapter implements the full Flipper adapter contract:
0 commit comments