fix: Stale data read in validation query on Parse.Object update causes inconsistency between validation read and subsequent update write operation (#9859)
This commit is contained in:
committed by
GitHub
parent
8006a9e2c1
commit
f49efaf5bb
@@ -593,7 +593,7 @@ class DatabaseController {
|
||||
convertUsernameToLowercase(update, className, this.options);
|
||||
transformAuthData(className, update, schema);
|
||||
if (validateOnly) {
|
||||
return this.adapter.find(className, schema, query, {}).then(result => {
|
||||
return this.adapter.find(className, schema, query, { readPreference: 'primary' }).then(result => {
|
||||
if (!result || !result.length) {
|
||||
throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Object not found.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user