Thread (107 messages) 107 messages, 11 authors, 2018-11-15

Re: [PATCH v8 0/7] speed up index load through parallelization

From: Duy Nguyen <hidden>
Date: 2018-10-14 12:30:14

On Wed, Oct 10, 2018 at 5:59 PM Ben Peart [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -3460,14 +3479,18 @@ static struct index_entry_offset_table *read_ieot_extension(const char *mmap, si

        /* validate the version is IEOT_VERSION */
        ext_version = get_be32(index);
-       if (ext_version != IEOT_VERSION)
+       if (ext_version != IEOT_VERSION) {
+              error("invalid IEOT version %d", ext_version);
Please wrap this string in _() so that it can be translated.
               return NULL;
+       }
        index += sizeof(uint32_t);

        /* extension size - version bytes / bytes per entry */
        nr = (extsize - sizeof(uint32_t)) / (sizeof(uint32_t) + sizeof(uint32_t));
-       if (!nr)
+       if (!nr) {
+              error("invalid number of IEOT entries %d", nr);
Ditto. And reporting extsize may be more useful than nr, which we know
is zero, but we don't know why it's calculated zero unless we know
extsize.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help