* [PATCH] libndb: remove database size limit
@ 2020-09-21 20:19 kvik
2020-11-20 20:04 ` [9front] " kvik
0 siblings, 1 reply; 2+ messages in thread
From: kvik @ 2020-09-21 20:19 UTC (permalink / raw)
To: 9front
Libndb enforces a 128k size limit on unhashed database files.
Files exceeding the limit are ignored and complaints are issued.
This seems... suboptimal.
The following patch removes the limit.
diff -r 5ca47d85e288 sys/src/libndb/ndbhash.c
--- a/sys/src/libndb/ndbhash.c Mon Sep 21 11:43:31 2020 -0700
+++ b/sys/src/libndb/ndbhash.c Mon Sep 21 22:10:06 2020 +0200
@@ -142,17 +142,6 @@
}
s->ptr = NDBGETP(p);
s->type = Cptr1;
- } else if(db->length > 128*1024){
- print("Missing or out of date hash file %s.%s.\n", db->file, attr);
- syslog(0, "ndb", "Missing or out of date hash file %s.%s.", db->file, attr);
-
- /* advance search to next db file */
- s->ptr = NDBNAP;
- _ndbcacheadd(db, s, attr, val, nil);
- if(db->next == nil)
- return nil;
- t = ndbsearch(db->next, s, attr, val);
- goto out;
} else {
s->ptr = 0;
s->type = Dptr;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9front] [PATCH] libndb: remove database size limit
2020-09-21 20:19 [PATCH] libndb: remove database size limit kvik
@ 2020-11-20 20:04 ` kvik
0 siblings, 0 replies; 2+ messages in thread
From: kvik @ 2020-11-20 20:04 UTC (permalink / raw)
To: 9front
Bump.
Repeating patch and message for your convenience:
Libndb enforces a 128k size limit on unhashed database files.
Files exceeding the limit are ignored and complaints are issued.
This seems... suboptimal.
The following patch removes the limit.
diff -r 5ca47d85e288 sys/src/libndb/ndbhash.c
--- a/sys/src/libndb/ndbhash.c Mon Sep 21 11:43:31 2020 -0700
+++ b/sys/src/libndb/ndbhash.c Mon Sep 21 22:10:06 2020 +0200
@@ -142,17 +142,6 @@
}
s->ptr = NDBGETP(p);
s->type = Cptr1;
- } else if(db->length > 128*1024){
- print("Missing or out of date hash file %s.%s.\n", db->file, attr);
- syslog(0, "ndb", "Missing or out of date hash file %s.%s.", db->file, attr);
-
- /* advance search to next db file */
- s->ptr = NDBNAP;
- _ndbcacheadd(db, s, attr, val, nil);
- if(db->next == nil)
- return nil;
- t = ndbsearch(db->next, s, attr, val);
- goto out;
} else {
s->ptr = 0;
s->type = Dptr;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-20 20:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 20:19 [PATCH] libndb: remove database size limit kvik
2020-11-20 20:04 ` [9front] " kvik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).