#13254: Query on E-Mail Attributes Misses Files
--------------------------------+---------------------------------------
Reporter: AGMS | Owner: axeld
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: File Systems/BFS | Version: R1/Development
Resolution: | Keywords: query bfs index attribute
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
--------------------------------+---------------------------------------
Comment (by AGMS):
I had wondered if overly long attributes would mess things up, but I
thought it would be a string comparison with garbage after 256 bytes
giving inconsistent results, not an error code.
I'd go with the BeOS way, 255 byte max string contents and always have a
NUL at the end, but only for string type attributes (others like arrays of
integer attributes would cut off at 256). Should reduce the chance for
bugs and make other code simpler. Also insignificantly faster in terms of
cache performance :-).
Enforce the limit when writing keys of type string. Could keep the old
index data by always forcing byte [255] to zero upon reading a string
attribute key. Though a full reindex would be best in case losing the
last byte changes the sort order (not likely to happen).
--
Ticket URL: <https://dev.haiku-os.org/ticket/13254#comment:4>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.