Skip to content

Conversation

aysinha1996
Copy link
Contributor

This PR adds the interfaces changes in KCD dbs for introducing FetchCUSelector RPC.

@varunmahajan
Copy link
Contributor

/gcbrun

@@ -63,6 +63,11 @@ type Reader interface {
// the store.
// If f returns an error, that error is returned from FilesExist.
FilesExist(_ context.Context, fileDigests []string, f func(string) error) error

// FetchCUSelector calls f with the digest of each known compilation matching filter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need a new method? Could the existing Find filter be extended to support targets?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will get back to this soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FindCUMetadata is a simpler search - supporting only four filters - that too limited to a single corpus, revision, language and providing more data for a CU - specifically solving the use case of an Large Scale Analysis client. (and is more optimized in implementation).
Find is an Advanced Search - providing more filters and supports regex.
The difference lies in the internal implementation of both the APIs and the use case.
Hence, we have kept them as different interface methods.

Also, correponding to each interface method , a filter is used. hence, a new filter.

@varunmahajan
Copy link
Contributor

/gcbrun

@varunmahajan
Copy link
Contributor

@aysinha1996 presubmit failed. Can you PTAL?

@aysinha1996
Copy link
Contributor Author

@aysinha1996 presubmit failed. Can you PTAL?

Fixed.

@varunmahajan varunmahajan self-assigned this May 27, 2025
@varunmahajan varunmahajan merged commit 7ebb77d into master May 27, 2025
9 checks passed
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.

3 participants