Skip to content

Commit fb62ec8

Browse files
goutamvenkat-anyscalejoshkodi
authored andcommitted
[Data] - Fix mongo datasource collStats invocation (ray-project#57027)
<!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> ## Why are these changes needed? The `collStats` command had the wrong capitalization for s, so the command failed on invocation. https://www.mongodb.com/docs/manual/reference/command/collstats/ ## Related issue number <!-- For example: "Closes ray-project#1234" --> ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] Unit tests - [ ] Release tests - [ ] This PR is not tested :( <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Fixes MongoDB command name to `collStats` when retrieving `avgObjSize` in `MongoDatasource`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b017c04. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Signed-off-by: Goutam V. <goutam@anyscale.com> Signed-off-by: Josh Kodi <joshkodi@gmail.com>
1 parent 8ec29a6 commit fb62ec8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/ray/data/_internal/datasource/mongo_datasource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def _get_or_create_client(self):
5252
self._client, self._database, self._collection
5353
)
5454
self._avg_obj_size = self._client[self._database].command(
55-
"collstats", self._collection
55+
"collStats", self._collection
5656
)["avgObjSize"]
5757

5858
def get_read_tasks(

0 commit comments

Comments
 (0)