Skip to content

Commit

Permalink
fix(fetch_all_rows): pass down timeout correctly
Browse files Browse the repository at this point in the history
`fetch_all_rows` was passing timeout only to `request_all` call
while the inital request of the first page was using the default
timeout which isn't always enough, and can lead to the following
error:
```
(TestFrameworkEvent Severity.ERROR) period_type=one-time
event_id=e2d16764-de17-4150-bc90-ba2c6f5e5b90,
source=PartitionsValidationAttributes
message=Failed to collect partition info. Error details:
Requested pages were not delivered before timeout. Requested: 1; retrieved: 0; empty retrieved 0
```

in this change we change the session default timeout, assuming
this session is used mostly for those calls
  • Loading branch information
fruch committed Jan 9, 2024
1 parent 40c5ba2 commit ecbabd9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sdcm/utils/database_query_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ def fetch_all_rows(session, default_fetch_size, statement, retries: int = 4, tim
LOGGER.debug("Fetch all rows by statement: %s", statement)
session.default_fetch_size = default_fetch_size
session.default_consistency_level = ConsistencyLevel.QUORUM
session.default_timeout = timeout

@retrying(n=retries, sleep_time=5, message='Fetch all rows', raise_on_exceeded=raise_on_exceeded)
def _fetch_rows() -> list:
Expand Down

0 comments on commit ecbabd9

Please sign in to comment.