@sentio/runtime 3.5.0-rc.4 → 3.5.1-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js
CHANGED
package/lib/processor-runner.js
CHANGED
package/package.json
CHANGED
package/src/db-context.ts
CHANGED
|
@@ -172,16 +172,16 @@ export abstract class AbstractStoreContext implements IStoreContext {
|
|
|
172
172
|
private async sendUpsertInBatch(req: DBRequest_DBUpsert): Promise<DBResponse> {
|
|
173
173
|
if (this.upsertBatch) {
|
|
174
174
|
// merge the upserts
|
|
175
|
-
const { request, promise } = this.upsertBatch
|
|
176
|
-
request.entity =
|
|
177
|
-
request.entityData =
|
|
178
|
-
request.id =
|
|
175
|
+
const { request, promise, opId } = this.upsertBatch
|
|
176
|
+
request.entity = request.entity.concat(req.entity)
|
|
177
|
+
request.entityData = request.entityData.concat(req.entityData)
|
|
178
|
+
request.id = request.id.concat(req.id)
|
|
179
179
|
if (request.entity.length >= STORE_BATCH_SIZE) {
|
|
180
180
|
this.sendBatch()
|
|
181
181
|
}
|
|
182
182
|
if (STORE_UPSERT_NO_WAIT) {
|
|
183
183
|
return {
|
|
184
|
-
opId
|
|
184
|
+
opId
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
|