remove XXX
This commit is contained in:
parent
0c2e5d14b3
commit
1231cacef1
@ -23,7 +23,7 @@ var sumChannelSizes = function (sizes) {
|
|||||||
.reduce(function (a, b) { return a + b; }, 0);
|
.reduce(function (a, b) { return a + b; }, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
// XXX it's possible for this to respond before the server has had a chance
|
// FIXME it's possible for this to respond before the server has had a chance
|
||||||
// to fetch the limits. Maybe we should respond with an error...
|
// to fetch the limits. Maybe we should respond with an error...
|
||||||
// or wait until we actually know the limits before responding
|
// or wait until we actually know the limits before responding
|
||||||
var getLimit = Pinning.getLimit = function (Env, publicKey, cb) {
|
var getLimit = Pinning.getLimit = function (Env, publicKey, cb) {
|
||||||
|
|||||||
@ -81,7 +81,8 @@ Quota.updateCachedLimits = function (Env, cb) {
|
|||||||
|
|
||||||
req.on('error', function (e) {
|
req.on('error', function (e) {
|
||||||
Quota.applyCustomLimits(Env);
|
Quota.applyCustomLimits(Env);
|
||||||
if (!Env.domain) { return cb(); } // XXX
|
// FIXME this is always falsey. Maybe we just suppress errors?
|
||||||
|
if (!Env.domain) { return cb(); }
|
||||||
cb(e);
|
cb(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -232,7 +232,9 @@ RPC.create = function (config, cb) {
|
|||||||
myDomain: config.myDomain,
|
myDomain: config.myDomain,
|
||||||
mySubdomain: config.mySubdomain,
|
mySubdomain: config.mySubdomain,
|
||||||
customLimits: config.customLimits,
|
customLimits: config.customLimits,
|
||||||
domain: config.domain // XXX
|
// FIXME this attribute isn't in the default conf
|
||||||
|
// but it is referenced in Quota
|
||||||
|
domain: config.domain
|
||||||
};
|
};
|
||||||
|
|
||||||
Env.defaultStorageLimit = typeof(config.defaultStorageLimit) === 'number' && config.defaultStorageLimit > 0?
|
Env.defaultStorageLimit = typeof(config.defaultStorageLimit) === 'number' && config.defaultStorageLimit > 0?
|
||||||
|
|||||||
@ -1123,7 +1123,7 @@ module.exports.create = function (conf, cb) {
|
|||||||
// iterate over the messages in a log
|
// iterate over the messages in a log
|
||||||
readMessagesBin: (channelName, start, asyncMsgHandler, cb) => {
|
readMessagesBin: (channelName, start, asyncMsgHandler, cb) => {
|
||||||
if (!isValidChannelId(channelName)) { return void cb(new Error('EINVAL')); }
|
if (!isValidChannelId(channelName)) { return void cb(new Error('EINVAL')); }
|
||||||
// XXX there is a race condition here
|
// FIXME there is a race condition here
|
||||||
// historyKeeper reads the file to find the byte offset of the first interesting message
|
// historyKeeper reads the file to find the byte offset of the first interesting message
|
||||||
// then calls this function again to read from that point.
|
// then calls this function again to read from that point.
|
||||||
// If this task is in the queue already when the file is read again
|
// If this task is in the queue already when the file is read again
|
||||||
@ -1143,7 +1143,7 @@ module.exports.create = function (conf, cb) {
|
|||||||
// remove a channel and its associated metadata log if present
|
// remove a channel and its associated metadata log if present
|
||||||
removeChannel: function (channelName, cb) {
|
removeChannel: function (channelName, cb) {
|
||||||
if (!isValidChannelId(channelName)) { return void cb(new Error('EINVAL')); }
|
if (!isValidChannelId(channelName)) { return void cb(new Error('EINVAL')); }
|
||||||
// XXX there's another race condition here...
|
// FIXME there's another race condition here...
|
||||||
// when a remove and an append are scheduled in that order
|
// when a remove and an append are scheduled in that order
|
||||||
// the remove will delete the channel's metadata (including its validateKey)
|
// the remove will delete the channel's metadata (including its validateKey)
|
||||||
// then the append will recreate the channel and insert a message.
|
// then the append will recreate the channel and insert a message.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user