Skip to content

Commit

Permalink
Allow parallelism factor for join to be passed through bootstrap()
Browse files Browse the repository at this point in the history
  • Loading branch information
jwolski committed Jun 1, 2015
1 parent 9b39be8 commit d4e2a61
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ RingPop.prototype.setupChannel = function setupChannel() {
createRingPopTChannel(this, this.channel);
};

/*
* opts are:
* - bootstrapFile: File or array used to seed join process
* - joinParallelismFactor: Number of nodes in which join request
* will be sent
*/
RingPop.prototype.bootstrap = function bootstrap(opts, callback) {
var bootstrapFile = opts.bootstrapFile || opts;

Expand Down Expand Up @@ -228,7 +234,8 @@ RingPop.prototype.bootstrap = function bootstrap(opts, callback) {
sendJoin({
ringpop: this,
maxJoinDuration: this.maxJoinDuration,
joinSize: this.joinSize
joinSize: this.joinSize,
parallelismFactor: opts.joinParallelismFactor
}, function onJoin(err, nodesJoined) {
if (err) {
self.logger.error('ringpop bootstrap failed', {
Expand Down

0 comments on commit d4e2a61

Please sign in to comment.