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

only create one db instance when syncing #2662

Closed
wants to merge 1 commit into from

Conversation

calvinmetcalf
Copy link
Member

currently it creates 2 e.g. double http calls all the way through

@calvinmetcalf calvinmetcalf changed the title (#xxx) - only create one db instance when syncing only create one db instance when syncing Aug 21, 2014
@nolanlawson
Copy link
Member

Just to check: the only thing duplicated is the initial GET/PUT of the db itself, right?

Nice catch.

@calvinmetcalf
Copy link
Member Author

yes (theoretically a race condition?)

@nolanlawson
Copy link
Member

Yeah, I think they could both try to PUT at the same time if the database doesn't exist yet.

@nolanlawson
Copy link
Member

👍 when green

@nolanlawson
Copy link
Member

Actually, you have a typo:

var PouchConstructor = opts.PouchConstructor || Pouch;

should be

var PouchConstructor = opts.pouchConstructor || Pouch;

I'll just fix it for you, rebase, and push again.

@calvinmetcalf
Copy link
Member Author

068c1da0a475f1fc8e872c509b70841ef9db1f23and

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