Actions
Bug #10224
closed[FUSE] Fix expensive calls to log API
Start date:
11/02/2016
Due date:
% Done:
0%
Estimated time:
(Total: 0.00 h)
Story points:
-
Updated by Tom Clegg about 8 years ago
Copied from #10028:
I tried some queries on test servers and found- counting lots of rows in a huge table is slow, regardless of how great the index is: in order to count accurately, postgresql has to visit every counted row
- given this, postgresql might be outsmarting us when it does a seq scan in our test trials. It knows most of the rows match the query, which means it will have to visit them anyway when it does a count -- so there is not much benefit in consulting the index first.
- arv-mount: subscribe to all events
self.events = arvados.events.subscribe(self._api_client, [["event_type", "in", ["create", "update", "delete"]]], self.on_event)
- Python SDK:
items = self.api.logs().list(limit=1, order="id desc", filters=f).execute()['items']
- API server:
list[:items_available] = @objects. except(:limit).except(:offset). count(:id, distinct: true)
- Postgresql: Slowly count all rows of the giant logs table with event_type ∈ {"create", "update", "delete"}.
Nobody here actually cares about items_available.
All PollClient needs is max(id) from the logs table, and only for the purpose of passing it to the next logs().list() call.
Perhaps it could pass a filter like [["created_at",">=",subscription_time]]
(instead of doing this expensive API call to find the last known ID and then passing [["logs.id",">",str(self.id)]]
) ...?
Updated by Tom Clegg about 8 years ago
10224-efficient-event-poll-startup
Updated by Radhika Chippada about 8 years ago
API unit tests failed (log_test)
One python test failed: test_subscribe_poll (tests.test_events.WebsocketTest)
I didn’t run the fuse tests
With the tests fixed, LGTM
Updated by Tom Clegg about 8 years ago
API unit tests fixed.
Python SDK tests pass for me. We'll see what Jenkins thinks -- build 56 queued at https://ci.curoverse.com/job/developer-run-tests/
Updated by Tom Clegg about 8 years ago
- Status changed from In Progress to Resolved
Actions