Skip to content

Commit

Permalink
Merge pull request #8152 from liranmauda/liran-backport-into-5_15
Browse files Browse the repository at this point in the history
[Backport into 5.15] fix for list_objects
  • Loading branch information
liranmauda authored Jun 18, 2024
2 parents 1c8533f + fbd4d3c commit ece9116
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/object_services/object_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,9 @@ function _list_add_results(state, results) {
// this case avoids another last query when we got less results and no common prefixes
// with common prefixes we cannot avoid the last query because the results might be
// less than the requested limit although there are more results to fetch
if (!has_common_prefixes && count >= state.user_limit) {
//
// for postgres we should not do another query, since the list command returns the required limit
if (config.DB_TYPE === 'postgres' || (!has_common_prefixes && count >= state.user_limit)) {
state.done = true;
}
}
Expand Down

0 comments on commit ece9116

Please sign in to comment.