Opened 16 years ago
Closed 8 months ago
#353 closed defect (fixed)
MSet::fetch() hint ignored by remote backend
Reported by: | Richard Boulton | Owned by: | Olly Betts |
---|---|---|---|
Priority: | highest | Milestone: | 1.5.0 |
Component: | Backend-Remote | Version: | git master |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
The old "network" backend (removed in r7141) implemented specialised request_document() and collect_document() methods. These were used to allow the MSet::fetch() methods to request the documents which the user wanted in bulk, rather than having a request-fetch conversation across the link for each document.
The new "remote" backend, since it was implemented in r7141, doesn't have this specialisation. I believe it should be added back, so that it's possible to get the full contents of matches in bulk. However, if it isn't to be added back in, we should remove the machinery in Xapian::MSet and Xapian::Database::Internal which is there to support this feature.
Change History (11)
comment:1 by , 16 years ago
Milestone: | 1.1.1 → 1.2.0 |
---|---|
Summary: | Remote backend doesn't have specialised request_docuement() and collect_document() methods → MSet::fetch() hint ignored by remote backend |
comment:2 by , 16 years ago
Owner: | changed from | to
---|
No, but I'm likely to be doing at least one of several potential projects using the remote backend heavily in the next 6 months, so might get a good chance to benchmark this in real-world situations. Don't really mind what the milestone is, as long as there's a ticket for me to refer to. :)
comment:4 by , 11 years ago
Milestone: | 1.3.x → 1.3.3 |
---|
We should decide (probably by profiling) if we're going to keep this feature or not.
If we are, it should actually be implemented; if not, we should remove the machinery, deprecated the methods, and make them inline no-ops or compatibility wrappers in the API headers.
comment:5 by , 10 years ago
Milestone: | 1.3.3 → 1.3.4 |
---|
It seems that fetch()
may be useful for local databases, as we can give the OS hints to prefetch blocks from the record table to speed up getting results. See #671.
So bumping this until we have more idea about that.
comment:6 by , 9 years ago
Milestone: | 1.3.4 → 1.4.x |
---|
I think we keep this API. Leaving this open to review whether we can actually make use of it for the remote backend.
comment:7 by , 21 months ago
Milestone: | 1.4.x → 1.5.0 |
---|---|
Version: | SVN trunk → git master |
It occurs to me that if we don't reimplement fetching documents across the link in response to MSet::fetch()
for a remote database, then it should probably at least cause us to perform "local" prefetch but on the server, to help ensure the data needed to service get_document()
is in the disk cache there so the server responds more quickly.
comment:8 by , 21 months ago
Owner: | changed from | to
---|
comment:9 by , 13 months ago
Status: | new → assigned |
---|
It'd be good to implement the local-prefetch-on-remote for 1.5.0 as it'll require a protocol addition (could be done as a minor protocol bump, but cleaner to do with the start of a new release series).
I'll see if I can get it done, but might still postpone this.
comment:10 by , 13 months ago
Priority: | normal → highest |
---|
comment:11 by , 8 months ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Implemented sending the prefetch request to get run on the remote server in git master in 02bfcf0541c6beacf25501d95f759baf485b058b. We could probably backport to 1.4.x with a remote protocol minor version bump but I'm not currently planning to as minor bumps are still a slightly less smooth experience for users upgrading, and we're a long way into 1.4.x now (also I want to focus on actually getting the next release series out).
I'm going to close this ticket now. I've opened #827 for investigating whether it's worth implementing something like what MSet::fetch()
did in the old "network" backend, i.e. trigger documents to actually get fetched from the remote in the background.
I didn't reimplement them as my testing (of the old remote backend) didn't show any speed up. I thought there was a comment somewhere about this but I don't see it.
I wondered if it might make a difference with higher latency connections, or other circumstances than those I tested (or if something about the old protocol was perhaps the problem) so I didn't strip out the API at the time.
This certainly merits further study though.
If we want to keep this, the current API seems sane so this could be done at any point. If we want to strip out the remaining machinery and deprecate
MSet::fetch()
, then in or before 1.2.0 would be best. So I think 1.2.0 is the appropriate milestone unless you're planning to work on this urgently.