aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-06-04 12:39:36 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-06-04 13:35:07 -0700
commit7b78eb4af6e87532795d09bd82152002ab4a74b1 (patch)
treeeb2ccea430a8162698787489dce2c4703f9b0f55 /configure
parent77ab73834325f2b2a8870204af60e116d4209f12 (diff)
Add support (and tests) for messages with really long message IDs.
Scott Henson reported an internal error that occurred when he tried to add a message that referenced another message with a message ID well over 300 characters in length. The bug here was running into a Xapian limit for the length of metadata key names, (which is even more restrictive than the Xapian limit for the length of terms). We fix this by noticing long message ID values and instead using a message ID of the form "notmuch-sha1-<sha1_sum_of_message_id>". That is, we use SHA1 to generate a compressed, (but still unique), version of the message ID. We add support to the test suite to exercise this fix. The tests add a message referencing the long message ID, then add the message with the long message ID, then finally add another message referencing the long ID. Each of these tests exercise different code paths where the special handling is implemented. A final test ensures that all three messages are stitched together into a single thread---guaranteeing that the three code paths all act consistently.
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions