Re: [PATCH v8 0/7] speed up index load through parallelization
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Oct 14, 2018, 12:28 UTC
- Message-ID
- <CACsJy8CyG0DWPyq5cSUteFUiz1ZCpmmVFjYjt8Gxm3Hnvd5q9g@mail.gmail.com>
- In-Reply-To
- <20181010155938.20996-1-peartben@gmail.com>
On Wed, Oct 10, 2018 at 5:59 PM Ben Peart <peartben@gmail.com> wrote:
Show 7 quoted lines
> @@ -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.
Show 9 quoted lines
> 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