如果所有值都被垃圾收集,是否会自动删除一行?

Is a row automatically deleted if all the values are garbage-collected?

假设有一行包含一个列族和一个列。该列族有一个 gc 策略,该列中的所有值都刚刚过期。

那么,那一行会发生什么?该行会被垃圾收集器删除吗?或者,它是否仍然存在并且可以访问?

我查看了文档,但只发现 https://cloud.google.com/bigtable/docs/overview#empty-cells

对此有一些模糊的评论

Empty cells in a Cloud Bigtable table do not take up any space. Each row is essentially a collection of key/value entries, where the key is a combination of the column family, column qualifier and timestamp. If a row does not include a value for a specific key, the key/value entry is simply not present.

在我的例子中,根据上面的文本,集合将是空的。然后,我的问题是空集合是否仍然存在。

理想情况下,我希望自动删除一个空行,以防止 table 有太多空行。如果没有自动删除空行,除了编写扫描和删除此类行的程序外,是否有任何方法可以自动删除?

如果对一个行键的所有单元格都进行了垃圾回收,那么该行确实被删除了。请注意,garbage collection is asynchronous,并且最多可能需要一周的时间才能完全删除数据。