9front - general discussion about 9front
 help / color / mirror / Atom feed
From: unobe@cpan.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: Thu, 11 Jan 2024 20:21:29 -0800	[thread overview]
Message-ID: <0BB1F90701C5DE0F1B59CBD069E160E6@smtp.pobox.com> (raw)
In-Reply-To: <A88A9FAE043066068B83395367FCEB33@eigenstate.org>

Thanks, ori.  I hadn't noticed that!  But I don't see any
corresponding soft limit for the attribute.  Do I understand correctly
that /sys/src/libndb/ndbaux.c:34 just clips the attribute down to 32
bytes?

Quoth ori@eigenstate.org:
> 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:[~2024-01-12  4:22 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
2024-01-12  4:21       ` unobe [this message]
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=0BB1F90701C5DE0F1B59CBD069E160E6@smtp.pobox.com \
    --to=unobe@cpan.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).