In UploadStash, prioritize core metadata over file handler metadata
authorBrian Wolff <bawolff+wn@gmail.com>
Sat, 24 Oct 2015 18:15:26 +0000 (12:15 -0600)
committerBrian Wolff <bawolff+wn@gmail.com>
Sun, 25 Oct 2015 18:19:32 +0000 (12:19 -0600)
commit6d59689af561f0fd329b8defc7790020911537fa
tree1021254b26e611f4f159e63cf1aa4810a997370e
parent7c21be6c559cd816434cc1772eac682f12e161b1
In UploadStash, prioritize core metadata over file handler metadata

If us_props is too big for the database (> 64kb), don't store the
file handler metadata. This is usually by far the biggest portion
(For pdf/djvu it contains OCR data), and it's non-critical to the
upload process as it's only needed for display, and the file handler
will probably regenerate it anyway if it is missing.

At some point in the future, having data too big for a db field
is probably going to cause errors instead of silent truncation,
so we really don't want to be doing silent truncation.

An alternative way to solve T94562 might be to make it use us_sha1
instead of the one encoded in us_props, but seems like it's important
to fix us_props for other data in it too.

Bug: T94562
Change-Id: I8aed6a1a5c9a136090b36d4ad23d8429791f58c4
includes/upload/UploadStash.php