Enforce key length constraint of 2048 bytes.

Aside from needing to enforce a constraint of some sort, this change
allows us to definitively specify KeyMax, removing the previous requirement
that keys stored in the map couldn't start with \xff.
This is the limit on the key length. Just to be clear--do you think this is
still to low? dynamoDB had 2048 limit for hash key and 1024 limit for range
key. Perhaps I could up this to 3072?

On Friday, October 3, 2014, Peter Mattis <notifications@github.com> wrote:

> In storage/engine/keys.go:
>
> > @@ -210,12 +211,13 @@ func ValidateRangeMetaKey(key Key) error {
> >
> >  // Constants for system-reserved keys in the KV map.
> >  var (
> > +	// KeyMaxLength is the maximum key length.
> > +	KeyMaxLength = 2048
>
> While have a limit is good, this seems fairly low. Is there any associated
> rationale you can provide (in comments) for the setting of this limit? For
> example, bigtable had a maximum row size because certain operations
> required the entire row to be in memory.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/cockroachdb/cockroach/pull/106/files#r18425648>.
>