Migrating snappy compressed _state files


(Josh Holtzman) #1

I am upgrading a 0.19.9 cluster, first to 0.20.6, then to 0.90.9 in
anticipation of the 1.0 release. The upgrade to 0.20.6 is smooth, but when
starting up 0.90.9 my cluster loads some indices but not others. A
representative stack trace is below.

It looks like the mappings are stored in _state files using snappy
compression. When 0.90.9 attempts to read these, it interprets these files
as XContentType.SMILE binary format. A breakpoint at IndexMetaData
fromXContent(XContentParser parser) shows the mapping looks like this:

snappyÄÄ ı™ 1{"default":{"analyzer":"myanalyzer","properties":{}}}

I've tried setting compress.default.type: lzf in 0.20.6, then flushing and
optimizing before starting up 0.90.9, but these do not have any effect. I
know snappy compression is no longer supported. Is there any way to
migrate these state files to 0.90.9?

[2014-01-03 16:57:19,473][DEBUG][gateway.local.state.meta ] [Anubis]
[myindex]: failed to read
[/path/to/elastic/cluster_name/nodes/0/indices/myindex/_state/state-403],
ignoring...
org.elasticsearch.common.jackson.core.JsonParseException: Invalid UTF-8
start byte 0x80
at [Source: [B@18c07930; line: 1, column: 9]
at
org.elasticsearch.common.jackson.core.JsonParser._constructError(JsonParser.java:1524)
at
org.elasticsearch.common.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:557)
at
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser._reportInvalidInitial(UTF8StreamJsonParser.java:3111)
at
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser._decodeCharForError(UTF8StreamJsonParser.java:2857)
at
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:3089)
at
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2340)
at
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:818)
at
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:698)
at
org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:50)
at
org.elasticsearch.common.xcontent.support.AbstractXContentParser.readMap(AbstractXContentParser.java:194)
at
org.elasticsearch.common.xcontent.support.AbstractXContentParser.readOrderedMap(AbstractXContentParser.java:187)
at
org.elasticsearch.common.xcontent.support.AbstractXContentParser.mapOrdered(AbstractXContentParser.java:142)
at
org.elasticsearch.common.xcontent.support.AbstractXContentParser.mapOrderedAndClose(AbstractXContentParser.java:157)
at
org.elasticsearch.cluster.metadata.MappingMetaData.(MappingMetaData.java:275)
at
org.elasticsearch.cluster.metadata.IndexMetaData$Builder.fromXContent(IndexMetaData.java:650)
at
org.elasticsearch.gateway.local.state.meta.LocalGatewayMetaState.loadIndex(LocalGatewayMetaState.java:495)
at
org.elasticsearch.gateway.local.state.meta.LocalGatewayMetaState.loadState(LocalGatewayMetaState.java:455)
at
org.elasticsearch.gateway.local.state.meta.LocalGatewayMetaState.(LocalGatewayMetaState.java:145)

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/7b61c136-5dbd-4bcc-86c7-6c9bd972c281%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #2