INN commit: trunk/storage/tradindexed (tdx-data.c)
INN Commit
Russ_Allbery at isc.org
Wed May 20 20:10:05 UTC 2009
Date: Wednesday, May 20, 2009 @ 13:10:04
Author: iulius
Revision: 8481
It is pointless remapping index files for tradindexed when
articles have arrived out-of-order. Only data files need to
(holes in these files are not filled).
Modified:
trunk/storage/tradindexed/tdx-data.c
------------+
tdx-data.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Modified: tdx-data.c
===================================================================
--- tdx-data.c 2009-05-19 00:31:15 UTC (rev 8480)
+++ tdx-data.c 2009-05-20 20:10:04 UTC (rev 8481)
@@ -421,11 +421,10 @@
struct index_entry *entry;
ARTNUM offset;
- if ((article > data->high && high > data->high) || data->remapoutoforder) {
+ if (article > data->high && high > data->high) {
unmap_index(data);
map_index(data);
data->high = high;
- data->remapoutoforder = false;
} else if (innconf->nfsreader && stale_index(data))
unmap_index(data);
if (data->index == NULL)
@@ -461,11 +460,13 @@
return NULL;
if ((end > data->high && high > data->high) || data->remapoutoforder) {
+ data->remapoutoforder = false;
+ unmap_data(data);
+ }
+ if (end > data->high && high > data->high) {
unmap_index(data);
map_index(data);
- unmap_data(data);
data->high = high;
- data->remapoutoforder = false;
}
if (start > data->high)
@@ -524,6 +525,7 @@
that leads to on-disk IDX and DAT being out of sync could trigger a
problem here. */
if (entry->offset + entry->length > search->data->datalen) {
+ search->data->remapoutoforder = true;
warn("Invalid or inaccessible entry for article %lu in %s.IDX:"
" offset %lu length %lu datalength %lu",
search->current + search->data->base, search->data->path,
More information about the inn-committers
mailing list