Open lehvolk opened 2 years ago
Do you create tables with Exposed or you use existing table? Can you share CREATE TABLE
statement for your Locations db?
Do you create tables with Exposed.
Yes. Tables created with SchemaUtils. As a result SQL query is produced by SchemaUtils.
Do you have any SQLite specific parameters set to your connection?
Do you have any SQLite specific parameters set to your connection?
No. Something like this:
val config = SQLiteConfig().also {
it.setSynchronous(SQLiteConfig.SynchronousMode.OFF)
it.setJournalMode(SQLiteConfig.JournalMode.OFF)
it.setPageSize(32_768)
it.setCacheSize(-8_000)
}
if (location == null) {
val url = "jdbc:sqlite:file:jcdb-${UUID.randomUUID()}?mode=memory&cache=shared&rewriteBatchedStatements=true"
dataSource = SQLiteDataSource(config).also {
it.url = url
}
} else {
dataSource = SQLiteDataSource(config).also {
it.url = url
}
}
Hey @lehvolk. I tried to reproduce this issue with your setup but couldn't. Could you please verify that it still happens in the latest Exposed version (0.43.0 at the time of writing)?
I have an application that doing large number of inserts during startup.
How large?
I have an application that doing large number of inserts during startup. CPU snapshot shows that about 10% of time consumed by creating SQLExcpetions based on missed columns in ResultSet returned by JDBC driver.
Preconditions Having this as dependencies
Having dummy scheme:
and code:
This code produces 4 SQLExceptions with message
no such column: 'id'
andno such column: 'id'
,no such column: 'path'
.no such column: 'runtime'
andno such column: 'outdated'
As I can see in debug after insert driver returns result set for query
select last_insert_rowid()
and Exposed tries to restore entity with it.