dynamodb
dynamodb copied to clipboard
Throughput capacity is not updated while updating table
https://github.com/baseprime/dynamodb/blob/master/lib/createTables.js
Throughput capacity is not updated while updating table
I am also facing the same issue.In the below code, no options parameter is passed while updateTable method is called.
internals.createTable = function (model, options, callback) {
options = options || {};
var tableName = model.tableName();
model.describeTable(function (err, data) {
if(_.isNull(data) || _.isUndefined(data)) {
model.log.info('creating table: %s', tableName);
return model.createTable(options, function (error) {
if(error) {
model.log.warn({err : error}, 'failed to create table %s: %s', tableName, error);
return callback(error);
}
model.log.info('waiting for table: %s to become ACTIVE', tableName);
internals.waitTillActive(model, callback);
});
} else {
model.updateTable(function (err) {
if(err) {
model.log.warn({err : err}, 'failed to update table %s: %s', tableName, err);
return callback(err);
}
model.log.info('waiting for table: %s to become ACTIVE', tableName);
internals.waitTillActive(model, callback);
});
}
});
};