]> git.lizzy.rs Git - plan9front.git/commitdiff
libndb: remove db file size limit
authorkvik <kvik@a-b.xyz>
Sun, 6 Dec 2020 23:36:41 +0000 (00:36 +0100)
committerkvik <kvik@a-b.xyz>
Sun, 6 Dec 2020 23:36:41 +0000 (00:36 +0100)
Removes the 128 kB limit for files making up the database.
We used to skip over and complain about files that exceeded
the limit, forcing the user to generate hash files.

This caused things to inexplicably stop working after a file
hit the hidden limit, which is unreasonable behaviour considering
that libndb happily, albeit slowly, works with bigger files.

sys/src/libndb/ndbhash.c

index 63b0839de57281e02cff533654b91ed175b0217f..ff481231fc9e22bf88931dc8c27d932eb1e889b0 100644 (file)
@@ -142,17 +142,6 @@ ndbsearch(Ndb *db, Ndbs *s, char *attr, char *val)
                }
                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;