Skip to content

Keep the session example in its own database - #184

Open
rayw-lab wants to merge 1 commit into
apache:mainfrom
rayw-lab:codex/iotdb-session-example-isolation
Open

rayw-lab wants to merge 1 commit into
apache:mainfrom
rayw-lab:codex/iotdb-session-example-isolation

Conversation

@rayw-lab

Copy link
Copy Markdown

I ran the session example against a fresh IoTDB instance and found three databases left behind. The example now creates a database with a fresh name and keeps its writes and queries under that name. It removes the databases it created when the run finishes successfully. If the initial create fails, it leaves the existing database alone.

I checked this against a disposable IoTDB 2.0.5 instance. A run starting from an empty instance left it empty. A run with data already present under the old example names preserved all nine seeded values. I also forced a name collision and checked that the existing data survived.

The example README explains where to look if a run is interrupted before cleanup.

Fixes #141

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

Successfully merging this pull request may close these issues.

The side effect of example/session_example.go

1 participant