Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent Queries #79

Closed
wants to merge 3 commits into from
Closed

Concurrent Queries #79

wants to merge 3 commits into from

Conversation

jo
Copy link
Member

@jo jo commented Jun 3, 2012

An error is thrown when you initialize two queries one after another:

pouch.idb.js:777

Uncaught TypeError: Cannot read property '_id' of undefined

it seems like both queries share at least some parts of the same context.

The testsuite should abort after that error.

@daleharvey
Copy link
Member

Hah yeh, I knew this would likely be a problem, its because emit is a global, on the second invocation it will get the scope of the second call (as you can see by the second query getting 2 results)

emit is problematic since it has to be available for the map code to call, will look into it, thanks for the test

@daleharvey
Copy link
Member

Right, merged commits from this (and fixed the bug)

However due to me cherry picking and rebase merging your commits from before, I have screwed up your repo (thats why this pull request is weird with a merge commit + 2 commits)

Could you wipe your repo and do new pull requests from a clean branch, and I will stop cherry picking and merge properly, sorry for the hassle, Cheers

@daleharvey daleharvey closed this Jun 3, 2012
@jo
Copy link
Member Author

jo commented Jun 3, 2012

Thats good news, thanks for fixing. PouchDB rocks!

I now have a clean branch, no problem.

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

Successfully merging this pull request may close these issues.

None yet

2 participants