# Nonvalid / Inconsistent Timestamp Records

**URL:** <https://forum.tiledb.com/t/nonvalid-inconsistent-timestamp-records/35>\
**Category:** Uncategorized\
**Created:** [November 21, 2018, 4:11am UTC](https://forum.tiledb.com/t/nonvalid-inconsistent-timestamp-records/35 "2018-11-21T04:11:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlizzo](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@rlizzo](https://forum.tiledb.com/u/rlizzo)\
**Post date:** [November 21, 2018, 4:11am UTC](https://forum.tiledb.com/t/nonvalid-inconsistent-timestamp-records/35/1 "2018-11-21T04:11:41Z")

</div>

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:

```python
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))

```

```bash
timestamp 1: 1542773169335
timestamp 2: 1542773169335
actual timestamp:
[' __lock.tdb', '__ array_schema.tdb', '__fb1ed82e140541a0a6c867304e59cecd_1542773169337']

```

---

<div class="post-metadata">

**Author:** ![stavros](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@stavros](https://forum.tiledb.com/u/stavros)\
**Post date:** [December 11, 2018, 10:58pm UTC](https://forum.tiledb.com/t/nonvalid-inconsistent-timestamp-records/35/2 "2018-12-11T22:58:12Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![rlizzo](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@rlizzo](https://forum.tiledb.com/u/rlizzo)\
**Post date:** [December 11, 2018, 11:11pm UTC](https://forum.tiledb.com/t/nonvalid-inconsistent-timestamp-records/35/3 "2018-12-11T23:11:49Z")

</div>

Issue opened!

> <https://github.com/TileDB-Inc/TileDB/issues/1089>

Thanks for the assistance!

---

<div class="post-metadata">

**Author:** ![stavros](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@stavros](https://forum.tiledb.com/u/stavros)\
**Post date:** [December 11, 2018, 11:14pm UTC](https://forum.tiledb.com/t/nonvalid-inconsistent-timestamp-records/35/4 "2018-12-11T23:14:12Z")

</div>

Thanks a lot, we will fix it soon!
