Skip to content

re-CREATE DATABASE with default duration deletes old data! #5696

Closed
@dkerwin

Description

Hi,

when a database and associated measurements already exist and you run "CREATE DATABASE IF NOT EXISTS x WITH DURATION..." the data is gone. Example:

> use dkn
Using database dkn

> select count(value) from processed_by_client
name: processed_by_client
-------------------------
time    count
0   213

> CREATE DATABASE IF NOT EXISTS dkn WITH DURATION 90d REPLICATION 1

> select count(value) from processed_by_client
> show measurements
>

If i skip "WITH DURATION..." everything behaves as expected. From my perspective "IF NOT EXISTS" should never ever delete data! Looks like a pretty bad bug to me.

Cheers 🍻
Daniel

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions