9front - general discussion about 9front
 help / color / mirror / Atom feed
From: kvik@a-b.xyz
To: 9front@9front.org
Subject: Re: [9front] [PATCH] libndb: remove database size limit
Date: Fri, 20 Nov 2020 21:04:04 +0100	[thread overview]
Message-ID: <95033F0DC59EE5B31D4E5AA44277FD09@hog> (raw)
In-Reply-To: <5CD8AF11CB98A58E8F7A944615EC5C2C@a-b.xyz>

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;


      reply	other threads:[~2020-11-20 20:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 20:19 kvik
2020-11-20 20:04 ` kvik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95033F0DC59EE5B31D4E5AA44277FD09@hog \
    --to=kvik@a-b.xyz \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).