From edc5e86006bf5e4a2819c380bb65734fe9caa87e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 11 Jan 2017 18:41:40 +0100 Subject: [PATCH] Server: transaction serializable for videos --- server/controllers/api/remote/videos.js | 2 +- server/controllers/api/videos.js | 2 +- server/models/request.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/controllers/api/remote/videos.js b/server/controllers/api/remote/videos.js index b9494f602..c45a86dbb 100644 --- a/server/controllers/api/remote/videos.js +++ b/server/controllers/api/remote/videos.js @@ -203,7 +203,7 @@ function updateRemoteVideo (videoAttributesToUpdate, fromPod, finalCallback) { waterfall([ function startTransaction (callback) { - db.sequelize.transaction().asCallback(function (err, t) { + db.sequelize.transaction({ isolationLevel: 'SERIALIZABLE' }).asCallback(function (err, t) { return callback(err, t) }) }, diff --git a/server/controllers/api/videos.js b/server/controllers/api/videos.js index df068f961..55d671f5b 100644 --- a/server/controllers/api/videos.js +++ b/server/controllers/api/videos.js @@ -264,7 +264,7 @@ function updateVideo (req, res, finalCallback) { waterfall([ function startTransaction (callback) { - db.sequelize.transaction().asCallback(function (err, t) { + db.sequelize.transaction({ isolationLevel: 'SERIALIZABLE' }).asCallback(function (err, t) { return callback(err, t) }) }, diff --git a/server/models/request.js b/server/models/request.js index e048c288b..cd52ea767 100644 --- a/server/models/request.js +++ b/server/models/request.js @@ -174,7 +174,7 @@ function makeRequests () { }) }) - logger.info('Making requests to friends.', { requests: requestsToMakeGrouped }) + logger.info('Making requests to friends.') const goodPods = [] const badPods = [] -- 2.25.1