diff options
author | Quang-Minh Nguyen <qmnguyen@gitlab.com> | 2022-10-06 07:49:18 +0300 |
---|---|---|
committer | Quang-Minh Nguyen <qmnguyen@gitlab.com> | 2022-10-12 09:16:17 +0300 |
commit | 0a9253147ad953e6d148f184a0fa885b033603eb (patch) | |
tree | 57f7836ed593c079570c9dd306d875583d5bce22 /ruby/proto | |
parent | 99b5528b66b23c1a8399027ecdef306267e668ae (diff) |
Add limit and offset to SearchFilesByNameRequestqmnguyen0711/add-limit-offset-to-search-files-by-names-2
In the current implementation of SearchFilesByName RPC, all matched
files are returned back. In most cases, clients don't need all of them.
Instead, they perform pagination at their side. It makes sense to add
pagination from Gitaly side so that this RPC returns a reasonable subset
of files. This improvement would remove redundant payload in the
response.
To keep backward-compatibility, Gitaly doesn't enforce default limit or
offset. It's client's call.
Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/4449
Changelog: added
Diffstat (limited to 'ruby/proto')
-rw-r--r-- | ruby/proto/gitaly/repository_pb.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ruby/proto/gitaly/repository_pb.rb b/ruby/proto/gitaly/repository_pb.rb index 81df3add0..eb69510d8 100644 --- a/ruby/proto/gitaly/repository_pb.rb +++ b/ruby/proto/gitaly/repository_pb.rb @@ -265,6 +265,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :query, :string, 2 optional :ref, :bytes, 3 optional :filter, :string, 4 + optional :limit, :uint32, 5 + optional :offset, :uint32, 6 end add_message "gitaly.SearchFilesByNameResponse" do repeated :files, :bytes, 1 |