Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Check about the changes api #59

Closed
jhs opened this issue Jun 2, 2015 · 10 comments
Closed

Check about the changes api #59

jhs opened this issue Jun 2, 2015 · 10 comments
Milestone

Comments

@jhs
Copy link
Contributor

jhs commented Jun 2, 2015

Confirm that it works correctly

@jhs jhs added this to the 2.0.0 milestone Jun 2, 2015
@jhs jhs added the Agenda label Jun 24, 2015
@remkoboschker
Copy link

Hi,
I just received a strange error message from the follow.js code

 "Error: Database deleted after change: 2404-g1AAAAEneJzLYWBgYMlgTmGQT0lKzi9KdUhJMtHLSs1LLUst0kvOyS9NScwr0ctLLckBKmRKZEiy____f1YGUxIDA-O3XKAYe7JRskGKsTmqGWa4zUhyAJJJ9XBjmBLBxhgYJVkmohuDxyl5LECSoQFIAU3aDzWqFGyUuYlxUnJyMtEughh1AGIUzFUzwEYZmxqkGqYZZQEAGN1ZWg\n    at Feed.on_couch_data (/home/generators/services/node_modules/cloudant/node_modules/follow/lib/feed.js:437:18)\n    at Changes.handle_confirmed_req_event (/home/generators/services/node_modules/cloudant/node_modules/follow/lib/feed.js:322:30)\n    at Changes.emit (events.js:107:17)\n    at Changes.emit_changes (/home/generators/services/node_modules/cloudant/node_modules/follow/lib/stream.js:223:12)\n    at Changes.write_continuous (/home/generators/services/node_modules/cloudant/node_modules/follow/lib/stream.js:176:8)\n    at Changes.write (/home/generators/services/node_modules/cloudant/node_modules/follow/lib/stream.js:124:17)\n    at Request.ondata (stream.js:51:26)\n    at Request.emit (events.js:107:17)\n    at IncomingMessage.<anonymous> (/home/generators/services/node_modules/request/request.js:1150:12)\n    at IncomingMessage.emit (events.js:107:17)\n    at readableAddChunk (_stream_readable.js:163:16)\n    at IncomingMessage.Readable.push (_stream_readable.js:126:10)\n    at HTTPParser.parserOnBody (_http_common.js:132:22)\n    at TLSSocket.socketOnData (_http_client.js:317:20)\n    at TLSSocket.emit (events.js:107:17)\n    at readableAddChunk (_stream_readable.js:163:16)",

Luckily the database was not deleted 😃

@jhs
Copy link
Contributor Author

jhs commented Jun 26, 2015

Ha ha, sorry, that is very likely my own code that output that. "Printer on fire!"

I think the code detects for 404 or other errors and assumes the database is deleted. That is one way to trigger that code path, but apparently not the only way.

We are working to close this by this coming Tuesday at the latest.

@jhs
Copy link
Contributor Author

jhs commented Jun 30, 2015

@remkoboschker Have you still got this bug in the new 1.1 release? I think you may still have it. If so, we can work more fixes into the Follow and Nano code, which are dependencies of the Cloudant package.

@jhs jhs removed the Agenda label Jun 30, 2015
@remkoboschker
Copy link

@jhs I'll update and keep you informed. I'm not sure how I can reproduce the bug.

@jhs
Copy link
Contributor Author

jhs commented Jul 15, 2015

Hi, @remkoboschker. I will close this ticket for now, since all the tests I can think of are passing. However, I definitely think there is still brittleness in the changes code. However I'll open a fresh ticket about that as I encounter it. Thanks!

@jhs jhs closed this as completed Jul 15, 2015
@remkoboschker
Copy link

@jhs thank you. I'll let you know when I observe any strange behaviour.

@remkoboschker
Copy link

Using version 1.2.0

{
  "message": "Database deleted after change: 3406-g1AAAAEneJzLYWBgYMlgTmGQT0lKzi9KdUhJstTLSs1LLUst0kvOyS9NScwr0ctLLckBKmRKZEiy____f1YGUxKQ9zkXKMZuapZsmJaYgmqGKW4zkhyAZFI93BjmALAxqYaWKUkpBkQ7JY8FSDI0ACmgSfuhRlWBjTJINEg1SUwl2kUQow5AjIK5aiLYqEQzA3Mzg9QsAHr6Wd8",
  "stack": "Error: Database deleted after change: 3406-g1AAAAEneJzLYWBgYMlgTmGQT0lKzi9KdUhJstTLSs1LLUst0kvOyS9NScwr0ctLLckBKmRKZEiy____f1YGUxKQ9zkXKMZuapZsmJaYgmqGKW4zkhyAZFI93BjmALAxqYaWKUkpBkQ7JY8FSDI0ACmgSfuhRlWBjTJINEg1SUwl2kUQow5AjIK5aiLYqEQzA3Mzg9QsAHr6Wd8\n    at Feed.on_couch_data (/home/generators/services/node_modules/cloudant/node_modules/nano/node_modules/follow/lib/feed.js:440:18)\n    at Changes.handle_confirmed_req_event (/home/generators/services/node_modules/cloudant/node_modules/nano/node_modules/follow/lib/feed.js:325:30)\n    at Changes.emit (events.js:107:17)\n    at Changes.emit_changes (/home/generators/services/node_modules/cloudant/node_modules/nano/node_modules/follow/lib/stream.js:223:12)\n    at Changes.write_continuous (/home/generators/services/node_modules/cloudant/node_modules/nano/node_modules/follow/lib/stream.js:176:8)\n    at Changes.write (/home/generators/services/node_modules/cloudant/node_modules/nano/node_modules/follow/lib/stream.js:124:17)\n    at Request.ondata (stream.js:51:26)\n    at Request.emit (events.js:107:17)\n    at IncomingMessage.<anonymous> (/home/generators/services/node_modules/cloudant/node_modules/nano/node_modules/follow/node_modules/request/request.js:1164:12)\n    at IncomingMessage.emit (events.js:107:17)\n    at readableAddChunk (_stream_readable.js:163:16)\n    at IncomingMessage.Readable.push (_stream_readable.js:126:10)\n    at HTTPParser.parserOnBody (_http_common.js:132:22)\n    at TLSSocket.socketOnData (_http_client.js:317:20)\n    at TLSSocket.emit (events.js:107:17)\n    at readableAddChunk (_stream_readable.js:163:16)",
  "deleted": true,
  "last_seq": "3406-g1AAAAEneJzLYWBgYMlgTmGQT0lKzi9KdUhJstTLSs1LLUst0kvOyS9NScwr0ctLLckBKmRKZEiy____f1YGUxKQ9zkXKMZuapZsmJaYgmqGKW4zkhyAZFI93BjmALAxqYaWKUkpBkQ7JY8FSDI0ACmgSfuhRlWBjTJINEg1SUwl2kUQow5AjIK5aiLYqEQzA3Mzg9QsAHr6Wd8",
  "time": "2015-08-19T14:10:47.105Z",
  "level": "err"
} 

I happy to report the database is still there. Also there were no changes at all.

@remkoboschker
Copy link

again at "2015-09-09T16:41:47.691Z"; does this mean there was a service interuption at cloudant?

@nicolelovecoding
Copy link

Just received the same error: "Error: Database deleted after change:...."

@csaroff
Copy link

csaroff commented Feb 27, 2016

It seems this issue is percolating up from the follow api. I've put in an issue there, but I'm not sure if this repository is still being maintained. In the meantime, anyone who is having this issue can look at the pouchdb changes api which also appears to extend EventListener.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants