Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solr error when a content is matched by location_id or parent_location_id on 64 bits architecture #131

Closed
oportier opened this issue Oct 11, 2017 · 2 comments

Comments

@oportier
Copy link

On a docker machine with on 64 bits architecture, with solr configured to optimize content search, we try to update root location id (2).

Migration file:

-
    type: content
    mode: update
    match:
        location_id: 2
    attributes:
        name: 'Home'```

Solr error:
   'msg' => 'For input string: "9223372036854775807"',
   'trace' => 'java.lang.NumberFormatException: For input string: "9223372036854775807"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:583)
at java.lang.Integer.parseInt(Integer.java:615)`

The issue is located in the query parameter 'rows' => '9223372036854775807'
This rows parameter is the $query->limit parameter set in the code like this in ContentMatcher:
https://github.com/kaliop-uk/ezmigrationbundle/blob/master/Core/Matcher/ContentMatcher.php#L87

On a base64 architecture, the value of PHP_INT_MAX is 9223372036854775807. This way of settings is located in lots of matcher in eZMigrationBundle and should be change to something else. Normaly 25 is the default value and should be enought for a simple matching that returns 1 row.

@gggeek
Copy link
Member

gggeek commented Oct 11, 2017

"Normaly 25 is the default value and should be enought for a simple matching that returns 1 row" => yes. Otoh we might use the matcher to match a lot of contents, given enough available ram ;-)

@gggeek gggeek closed this as completed Oct 15, 2017
@gggeek
Copy link
Member

gggeek commented Oct 15, 2017

Fixed in 4.1.1

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

No branches or pull requests

2 participants