syahra712 opened a new pull request, #125: URL: https://github.com/apache/solr-orbit/pull/125
### Description `_cursor_scan()` in `workload_generator/extractors.py` called `client._get_session()`, `client.base_url` and `client.timeout`. Only `SolrAdminClient` has those. `create-workload` passes in the `SolrClient` built by `ClientFactory`, so the scan failed with `'SolrClient' object has no attribute '_get_session'` before it read any documents. The scan now calls the data client's public `search()` with `cursorMark`, `rows` and `sort="id asc"`. That request goes through the pysolr client `SolrClient` already keeps for each collection, so it picks up the client's host, auth, TLS and timeout. The next cursor comes from `Results.nextCursorMark`, and the loop still stops on an empty page or when the cursor doesn't move. Removing `_version_` works the same as before. ### Issues Resolved Fixes #122 ### Testing - [x] New functionality includes testing - The new `tests/workload_generator/extractors_test.py` runs `_cursor_scan` on a real `SolrClient` with `search` stubbed. It checks the documents across pages, the cursor passed on each call, the query, rows and sort, and that the scan stops when the cursor doesn't move. Both tests fail on `main` with the `AttributeError` from the issue. - The full `tests/` suite passes locally on Python 3.13 (1171 passed, 5 skipped), and `ruff check` passes on the changed files. I haven't run `it/tracker_test.py::test_create_workload` against a live Solr. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
