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

Cottontail DB 0.16.0 crashes due invalid default config #154

Open
x4e-jonas opened this issue Dec 18, 2023 · 1 comment
Open

Cottontail DB 0.16.0 crashes due invalid default config #154

x4e-jonas opened this issue Dec 18, 2023 · 1 comment

Comments

@x4e-jonas
Copy link
Contributor

The newly released 0.16.0 does not work as expected:

$  docker run --rm vitrivr/cottontaildb:0.16.0
Could not load Cottontail DB configuration file under /cottontaildb-config/config.json. Cottontail DB will shutdown!
kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 77: Encountered an unknown key 'probability' at path: $.statistics.threshold
Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.
JSON input: {
  "root": "./cottontaildb",
  "statistics" : {
    "threshold" : 1.0,
    "probability" : 0.5,
    "randomGeneratorName": "L32X64MixRandom"
  }
}
	at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
	at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
	at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:598)
	at kotlinx.serialization.json.internal.AbstractJsonLexer.failOnUnknownKey(AbstractJsonLexer.kt:593)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.handleUnknown(StreamingJsonDecoder.kt:257)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeObjectIndex(StreamingJsonDecoder.kt:243)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeElementIndex(StreamingJsonDecoder.kt:178)
	at org.vitrivr.cottontail.config.StatisticsConfig$$serializer.deserialize(StatisticsConfig.kt:12)
	at org.vitrivr.cottontail.config.StatisticsConfig$$serializer.deserialize(StatisticsConfig.kt:12)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:69)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
	at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableElement(StreamingJsonDecoder.kt:168)
	at org.vitrivr.cottontail.config.Config$$serializer.deserialize(Config.kt:15)
	at org.vitrivr.cottontail.config.Config$$serializer.deserialize(Config.kt:15)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:69)
	at kotlinx.serialization.json.Json.decodeFromString(Json.kt:107)
	at org.vitrivr.cottontail.CottontailKt.loadConfig(Cottontail.kt:115)
	at org.vitrivr.cottontail.CottontailKt.main(Cottontail.kt:38)

Mounting the previous config doesn't work either:

$ docker run --rm --volume /my/config.json:/cottontaildb-config/config.json:ro,z vitrivr/cottontaildb:0.16.0
Could not load Cottontail DB configuration file under /cottontaildb-config/config.json. Cottontail DB will shutdown!
kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 38: Encountered an unknown key 'mapdb' at path: $.root
Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.
JSON input: {
  "root": "./cottontaildb-data",
  "mapdb": {
    "enableMmap": true,
    "forceUnmap": true,
    "pageShift": 22
  }
}

	at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
	at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
	at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:598)
	at kotlinx.serialization.json.internal.AbstractJsonLexer.failOnUnknownKey(AbstractJsonLexer.kt:593)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.handleUnknown(StreamingJsonDecoder.kt:257)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeObjectIndex(StreamingJsonDecoder.kt:243)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeElementIndex(StreamingJsonDecoder.kt:178)
	at org.vitrivr.cottontail.config.Config$$serializer.deserialize(Config.kt:15)
	at org.vitrivr.cottontail.config.Config$$serializer.deserialize(Config.kt:15)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:69)
	at kotlinx.serialization.json.Json.decodeFromString(Json.kt:107)
	at org.vitrivr.cottontail.CottontailKt.loadConfig(Cottontail.kt:115)
	at org.vitrivr.cottontail.CottontailKt.main(Cottontail.kt:38)

There are no upgrade instructions or hints in the release notes about any breaking changes.

@ppanopticon
Copy link
Member

ppanopticon commented Dec 18, 2023

Ohhh! I'll adjust the config.

However, the entire release is a breaking change. So I would refrain from upgrading for now, unless you start a fresh build or know exactly, what you do.

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