measurementTagValues returns tag even though all data points with such tag has been deleted

Dear all,
I’ve just migrated to v2 and facing an issue:

I deleted some data points from A measurement with “detector” tag = fit

influx delete --bucket readout --org alice \
  --start '1970-01-01T00:00:00Z' \
  --stop $(date +"%Y-%m-%dT%H:%M:%SZ") \
  --predicate '_measurement="A" AND detector="fit"'

So everything looked fine at first and I get no results when quering the data:

from(bucket:"readout")
  |> range(start: -30d)
  |> filter(fn: (r) =>
    r._measurement == "A" and
    r.detector == "fit"
  )

But when selecting tags, fit detector is still there:

  import "influxdata/influxdb/schema"
  schema.measurementTagValues(
    bucket: "readout",
    measurement: "A",
    tag: "detector"
  )

outputs:

#group,false,false,false
#datatype,string,long,string
#default,_result,,
,result,table,_value
,,0,fit
,,0,ft0
...

Any help would be appreciated.

Hello @awegrzyn,
Do you have that tag written before the period where you deleted the data? Can you check this assumption by running the following query?

from(bucket: readout)
|> range(start:0)
|> filter(fn: (r) => r["_measurement"] == "A" and r.detector == "fit" )

Are you still having this problem? Are you using Cloud or OSS?
This is the output I get when I do the same:

#group,false,false,false
#datatype,string,long,string
#default,_result,0,
,result,table,_value

Hi @Anaisdg,
I’m using OSS.
Nope, I dropped all data for this measurement, but… surprisingly I’ve just noticed that the tag is gone. It did take couple of days though. Could it be related to shard duration? Or DB size (it’s over 1 TB atm)?

Helllo @awegrzyn,
Yes I’m guessing it’s shard related.