Nonvalid / Inconsistent Timestamp Records


#1

This is a bug I’ve found in tiledb-python with version 1.4 and python 3 on MacOSX.

When writing large dense arrays arrays, the reported timestamp access when writing, and the actual timestamp of the fragment that is written do not match. This is an issue when trying to use the timestamp records in later procedures (reading an array).

Minimum program to reproduce:

import tiledb
import os
import numpy as np
import time

arr = np.arange(0, 10_000_000)
name = 'foo_array'
ctx = tiledb.Ctx()

tdb_dim = tiledb.Dim(ctx, name='d1', domain=(0, 9_999_999), tile=1000, dtype=np.int32)
tdb_dom = tiledb.Domain(ctx, tdb_dim)
tdb_attr = tiledb.Attr(ctx, name='v', dtype=arr.dtype)
tdb_schema = tiledb.ArraySchema(ctx, domain=tdb_dom, sparse=False, attrs=[tdb_attr])

tiledb.DenseArray.create(name, tdb_schema)

with tiledb.DenseArray(ctx, name, mode='w') as A:
    A[:] = arr
    w1Time = A.timestamp
    time.sleep(0.5)
    w2Time = A.timestamp

print(f'timestamp 1: {w1Time}')
print(f'timestamp 2: {w2Time}')

print(f'actual timestamp:')
print(os.listdir(name))
timestamp 1: 1542773169335
timestamp 2: 1542773169335
actual timestamp:
['__lock.tdb', '__array_schema.tdb', '__fb1ed82e140541a0a6c867304e59cecd_1542773169337']

#2

Sorry we missed that. We know what causes the problem and we’ll fix it shortly. Do you mind opening a Github issue for this (or we are happy to do so as well)?


#3

Issue opened!

Thanks for the assistance!


#4

Thanks a lot, we will fix it soon!