Corrupted or missing data inserted

Hi!
In the java application I’m working on, I need to register any user session. The development team decided to use QuestDB with its java client.
Locally I created a docker container for questDB version 8.2.2, while using org.questdb:questdb:8.2.2 as dependency.

Sometimes, I didn’t understand why and how, some data is inserted incorrectly: string values becomes corrupted while timestamp values are set to 01/01/1970. I’m sure that the data I send to the server is correct and valued (I have log evidences).
The code i use is

try (Sender sender = Sender.builder(questDbConfig).build()) {
	log.debug("inserting session entry {}", entry);

	sender.table("sessions")
			.stringColumn("username", entry.username())
			.stringColumn("rolename", entry.roleName())
			.stringColumn("sessionId", entry.sessionId())
			.longColumn("numberOfMonitors, entry.numberOfMonitors())
			.timestampColumn("startTime, entry.startTime())
			.longColumn("duration", entry.duration())
			.at(entry.endTime());
} catch (Exception e) {
	log.error("error inserting session entry in QuestDB for session: {}", entry.sessionId(), e);
}

The configuration I use is as simple as http::addr=localhost:9000. The table was created beforehands using the following command:

CREATE TABLE sessions
(
    username         VARCHAR,
    roleName         VARCHAR,
    sessionId        VARCHAR,
    numberOfMonitors BYTE,
    startTime        TIMESTAMP,
    duration         INT,
    endTime          TIMESTAMP
) TIMESTAMP(endTime) PARTITION BY MONTH;

A select all returns some rows, and some of them containing the following values
image
while it should have contained the “Administrator” string. The screenshot was taken from datagrip, since the web console returns an error icon without any message and no data.
The docker container doesn’t log anything related to errors inserting data.

Am I doing something wrong here? Thanks!

Hi @FulvioFulvioni ,

Are you using Docker on Windows with WSL2?

Exactly, the version is 27.2.0 if you need it.

We’ve been having trouble debugging this one. For some people, it is related to use of docker compose. For others, it doesn’t work with docker run. Sometimes, making the table first instead of auto-creating it helps. Sometimes restarting the database fixes it.

We suspect it is a strange interaction between the filesystem layers but haven’t been able to pin it down.

I would suggest just running the QuestDB binary directly: https://github.com/questdb/questdb/releases/download/8.2.2/questdb-8.2.2-rt-windows-x86-64.tar.gz

We have an issue here for it: docker-compose issue with inserting data into WAL tables · Issue #5124 · questdb/questdb · GitHub

1 Like

Many thanks, I will try to work on a linux machine then.
If you need additional resources, I’m using docker-compose with the following configurations

version: '3.7'

services:
  questdb:
    image: questdb/questdb:8.2.2
    container_name: questdb
    restart: no
    ports:
      - 9000:9000
      - 9009:9009
      - 8812:8812
      - 9003:9003
    volumes:
      - ../../docker-data/questdb:/root/.questdb
    environment:
      - QDB_PG_USER=xxx
      - QDB_PG_PASSWORD=xxx
      - QDB_TELEMETRY_ENABLED=false

All the tables have been created manually before running the application.

Thank you! We will try to fix it ASARP!