Skip to content

Commit 208ae7d

Browse files
committed
Fixed 404 issue.
1 parent 6adfca9 commit 208ae7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/commands.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function load (kv) {
159159
if ((entry && entry.value) || !dest) {
160160
reply(null, { key, value: entry ? entry.value : undefined })
161161
} else {
162-
upring.logger.debug({ key }, 'checking if we are in the middle of a migration')
162+
upring.logger.debug({ key }, 'data not found, checking if we are in the middle of a migration')
163163
upring.peerConn(dest)
164164
.request(req, function (err, res) {
165165
if (err) {
@@ -169,7 +169,7 @@ function load (kv) {
169169

170170
const entry = db.get(key)
171171

172-
if (res && !entry) {
172+
if (res && res.value && !entry && upring.allocatedToMe(key)) {
173173
upring.logger.debug({ key }, 'set data because of migration')
174174
put({
175175
ns: 'kv',

0 commit comments

Comments
 (0)