Shift SQLite to single session in thread pool (it isn't very thread

safe)
This commit is contained in:
Mike Primm 2022-02-05 02:05:54 -06:00
parent 6ce6b4a07f
commit 0c34d5a5b5

View File

@ -31,7 +31,7 @@ import org.dynmap.utils.BufferOutputStream;
public class SQLiteMapStorage extends MapStorage {
private String connectionString;
private String databaseFile;
private static final int POOLSIZE = 5;
private static final int POOLSIZE = 1; // SQLite is really not thread safe... 1 at a time works best
private Connection[] cpool = new Connection[POOLSIZE];
private int cpoolCount = 0;
private static final Charset UTF8 = Charset.forName("UTF-8");