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

SPARQLConnection size method counts client side instead of server side #4920

Open
JervenBolleman opened this issue Feb 29, 2024 · 0 comments · May be fixed by #4972
Open

SPARQLConnection size method counts client side instead of server side #4920

JervenBolleman opened this issue Feb 29, 2024 · 0 comments · May be fixed by #4972
Assignees
Labels
🐞 bug issue is a bug
Milestone

Comments

@JervenBolleman
Copy link
Contributor

Current Behavior

	@Override
	public long size(Resource... contexts) throws RepositoryException {
		try (RepositoryResult<Statement> stmts = getStatements(null, null, null, true, contexts)) {
			long i = 0;
			while (stmts.hasNext()) {
				stmts.next();
				i++;
			}
			return i;
		}
	}

Expected Behavior

Should be using a simple SPARQL query with a count.

Steps To Reproduce

Run void-generator see all triples from an endpoint being downloaded.

Version

4.3.8

Are you interested in contributing a solution yourself?

Yes

Anything else?

No response

@JervenBolleman JervenBolleman added the 🐞 bug issue is a bug label Feb 29, 2024
@JervenBolleman JervenBolleman self-assigned this Feb 29, 2024
@JervenBolleman JervenBolleman added this to the 5.0.0 milestone Feb 29, 2024
JervenBolleman added a commit that referenced this issue May 5, 2024
…nt in the repository. Just send a count query instead.

Signed-off-by: Jerven Bolleman <jerven.bolleman@sib.swiss>
@JervenBolleman JervenBolleman linked a pull request May 5, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment