Skip to content

Github bridge import: error, probably caused by line of 65536+ length #606

Closed

Description

@rng-dynamics

I tried to import all the issues from https://github.com/golang/go. (Currently I am using git-bug from PR #585).

This gives the following error:

import error: issue creation: key too large
imported 18123 issues and 5456 identities with default bridge

The error is caused when importing golang/go#18201 .
This issue contains a line of 65536+ length.

Activity

  1. MichaelMure commented on Mar 27, 2021

    @MichaelMure
    Contributor

    Hu, that's a funny one.

    Are you able to pinpoint a bit more where this error happen?

  2. rng-dynamics commented on Mar 27, 2021

    @rng-dynamics
    ContributorAuthor

    At the moment I do not know where the error happens exactly. Just looking at the error message it should originiate from somewhere below the call to repo.NewBugRaw().

    The cause might be the same as described in the issue which causes the error. There the cause was a bufio.Scanner (which has bufio.MaxScanTokenSize equal to 65536). The solution which the golang people found was to replace the bufio.Scanner by a bufio.Reader as described in https://go-review.googlesource.com/c/tools/+/93439/

  3. MichaelMure commented on Mar 28, 2021

    @MichaelMure
    Contributor

    So, what's happening is that this text is passed to Bleve (full text search) for indexing, Bleve process it then try to write a piece of data (with a very long key) to BoltDB (a key/value store).

    I filled an issue here: blevesearch/bleve#1576

  4. MichaelMure commented on Mar 28, 2021

    @MichaelMure
    Contributor

    I suppose that as a workaround, long token could be filtered before indexing in here: https://github.com/MichaelMure/git-bug/blob/fb6b2d873e1bbc653aa84ddce56c842202e00c33/cache/repo_cache_bug.go#L482-L484

  5. MichaelMure commented on Mar 28, 2021

    @MichaelMure
    Contributor

    Should be fixed with 32958b5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugRelates to an issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions