Skip to content

Commit

Permalink
Fixed 404 issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Mar 25, 2017
1 parent 6adfca9 commit 208ae7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/commands.js
Expand Up @@ -159,7 +159,7 @@ function load (kv) {
if ((entry && entry.value) || !dest) {
reply(null, { key, value: entry ? entry.value : undefined })
} else {
upring.logger.debug({ key }, 'checking if we are in the middle of a migration')
upring.logger.debug({ key }, 'data not found, checking if we are in the middle of a migration')
upring.peerConn(dest)
.request(req, function (err, res) {
if (err) {
Expand All @@ -169,7 +169,7 @@ function load (kv) {

const entry = db.get(key)

if (res && !entry) {
if (res && res.value && !entry && upring.allocatedToMe(key)) {
upring.logger.debug({ key }, 'set data because of migration')
put({
ns: 'kv',
Expand Down

0 comments on commit 208ae7d

Please sign in to comment.