9front - general discussion about 9front
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: 9front@9front.org
Subject: Re: [9front] [PATCH 6/6] ndb: document attribute name and value length constraints in BUGS section of man page
Date: Mon, 11 Dec 2023 14:46:32 -0500	[thread overview]
Message-ID: <A88A9FAE043066068B83395367FCEB33@eigenstate.org> (raw)
In-Reply-To: <8A65A33C9E3CCA551969AB24AD93D321@smtp.pobox.com>

Looking at the code, Ndbvlen seems to be a soft limit; it's only
the initial allocation to save a malloc, but we can grow past it;
see ndbsetval in /sys/src/libndb/ndbfree.c:29. There is a soft limit
coming from Brdline, which depends on the size of the buffer in the
NDB struct; maybe we should document that a line must be no longer
than 8k. (This was bumped not so long ago to support the large TXT
records needed by DKIM).

That said, I think documenting the attribute size is a good idea.


Quoth unobe@cpan.org:
> Ping.
> 
> Quoth unobe@cpan.org:
> > I came across these limitations (defined in /sys/include/ndb.h as
> > Ndbalen and Ndbvlen, respectively) when toying around with ndb as a
> > simple database.  This hopefully will save someone else some head
> > scratching when the query isn't returning as it should.
> > 
> > Quoth Romano <unobe@cpan.org>:
> > > ---
> > > diff 46cf9d4eb02a3a7c2516be3053994d4fb69eb949 0b5b2d58047b698564f6b1955a31cbcc95570abb
> > > --- a/sys/man/8/ndb
> > > +++ b/sys/man/8/ndb
> > > @@ -924,3 +924,5 @@
> > >  .I Ndb
> > >  databases are case-sensitive;
> > >  ethernet addresses must be in lower-case hexadecimal.
> > > +.I Ndb
> > > +database attributes are constrained to 32-byte attribute names and 64-byte attribute values.
> > > 
> > 
> 


  reply	other threads:[~2023-12-11 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28  5:47 Romano
2023-09-28  7:06 ` unobe
2023-12-11 19:19   ` unobe
2023-12-11 19:46     ` ori [this message]
2024-01-12  4:21       ` unobe
2024-01-12 16:31         ` ori

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=A88A9FAE043066068B83395367FCEB33@eigenstate.org \
    --to=ori@eigenstate.org \
    --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).