Skip to content

Conversation

@smacker
Copy link
Contributor

@smacker smacker commented Feb 6, 2019

In some cases writing docFreq to db can fail with error:
Key size too large: N > 65535

Inspecting DB after such failure I see feature names like:
ArrayExpression_ArrayExpression_[repeat many times]_ArrayExpression

Most probably it's a bug in UAST or Feature Extractor but gemini
shouldn't fail because of it anyway.

Signed-off-by: Maxim Sukharev [email protected]

// 65535 is the limit for a key in Scylla
// key = (hash mode, feature.name)
// and it's just sane to remove such huge name
.filter(feat => feat.name.length < 65530)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also write this as follows:

Suggested change
.filter(feat => feat.name.length < 65530)
.filter(_.name.length < 65530)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

In some cases writing docFreq to db can fail with error:
Key size too large: N > 65535

Inspecting DB after such failure I see feature names like:
ArrayExpression_ArrayExpression_[repeat many times]_ArrayExpression

Most probably it's a bug in UAST or Feature Extractor but gemini
shouldn't fail because of it anyway.

Signed-off-by: Maxim Sukharev <[email protected]>
@smacker smacker merged commit 9007a02 into src-d:master Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants