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

GetArtifacts returns all artifacts without pagination #201

Open
Sidebook opened this issue Aug 28, 2024 · 0 comments
Open

GetArtifacts returns all artifacts without pagination #201

Sidebook opened this issue Aug 28, 2024 · 0 comments

Comments

@Sidebook
Copy link

I'm using MLMD with MySQL DB + the official grpc server

When I don't give the option.max_result_size in a request, getArtifacts returns all artifacts without pagination

To reproduce it with grpcurl:

grpcurl -plaintext -proto ml_metadata/proto/metadata_store_service.proto localhost:13316 ml_metadata.MetadataStoreService/GetArtifacts

This is critical. When we have lots of artifacts (we're using Kubeflow), it will try to read all rows and it can kill a database instance.
Is this expected behavior? Shouldn't it return 100 artifacts with nextPageToken?

Another issue is when I give max_result_size larger than 100, nextPageToken will vanish and it always returns 101 artifacts.
I know I should not give a max_result_size larger than 100, but shouldn't it throw some errors?

https://github.com/google/ml-metadata/blob/master/ml_metadata/metadata_store/rdbms_metadata_access_object.cc#L2539

The if condition is only checking the lower bound.

@Sidebook Sidebook changed the title GetArtifacts returns ALL artifacts without pagination GetArtifacts returns all artifacts without pagination Aug 28, 2024
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

1 participant