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

changes block in hasNext #71

Open
djoly42 opened this issue Jan 23, 2018 · 4 comments
Open

changes block in hasNext #71

djoly42 opened this issue Jan 23, 2018 · 4 comments

Comments

@djoly42
Copy link

djoly42 commented Jan 23, 2018

the changes is blocked/stuck in hasnext when we lose connection despite the signal changes.stop being set to true in another thread. Can we use the stop in the "do while" condition and exit when the signal is true.

` if(!stop) {
String row = "";
do {
row = getReader().readLine();
} while(row.length() == 0 && !stop);

			if(!row.startsWith("{\"last_seq\":")) { 
				setNextRow(gson.fromJson(row, Row.class));
				hasNext = true;
			} 
		}`
@vectro
Copy link

vectro commented Jul 27, 2018

Can we merge the change from IndabaConsultores? Or if there is an objection to that patch, I'm happy to try to address it.

It needs to be possible to call stop() from another thread and have hasNext() exit, even if there are no updates from the database. Otherwise there is no way to cleanly stop the process.

@lightcouch
Copy link
Owner

Thanks for bringing up the issue.

There is a near coming release that should include the fix.

Kind Regards

@nasava
Copy link

nasava commented Jan 17, 2019

Any news regarding this? I am also affected.

@lightcouch
Copy link
Owner

A release due this weekend should address the issue. Thanks.

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

No branches or pull requests

4 participants