From: Chocobozzz Date: Wed, 11 Jan 2017 17:41:40 +0000 (+0100) Subject: Server: transaction serializable for videos X-Git-Tag: v0.0.1-alpha~574^2~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=edc5e86006bf5e4a2819c380bb65734fe9caa87e;p=oweals%2Fpeertube.git Server: transaction serializable for videos --- 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 = []