Skip to content

Commit

Permalink
added retry on conflicts when updating objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Razvan Botea committed Apr 27, 2016
1 parent a841474 commit 7d426b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/database/elasticsearch_adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ ElasticSearchDB.prototype.updateObjects = function(patches, callback) {
'def parsed = jsonSlurper.parseText(\''+JSON.stringify(dbObjects[id])+'\');'+
'ctx._source = parsed;';

bulk.push({update: {_type: objectModel, _id: id}});
bulk.push({update: {_type: objectModel, _id: id, _retry_on_conflict: 10}});
bulk.push({script: script});
c();
}, function() {
Expand Down

0 comments on commit 7d426b5

Please sign in to comment.