ArcticDB icon indicating copy to clipboard operation
ArcticDB copied to clipboard

Calling `sort_and_finalize_staged_data` throws there are no staged segments

Open vasil-pashov opened this issue 6 months ago • 0 comments

Describe the bug If nothing is added to the staged segment and sort_and_finalize_staged_data an exception is thrown.

Steps to reproduce

import pandas as pd
import numpy as np
import arcticdb as adb

ac = adb.Arctic("lmdb://test")
lib = ac.get_library("test", create_if_missing=True)
lib.sort_and_finalize_staged_data("sym")

Output:

[2024-08-01 12:48:34.144] [arcticdb] [error] E_ASSERTION_FAILURE Stream descriptor not found in pipeline context
Traceback (most recent call last):
  File "...\test.py", line 7, in <module>
    lib.sort_and_finalize_staged_data("sym")
  File "...arcticdb\version_store\library.py", line 959, in sort_and_finalize_staged_data
    self._nvs.version_store.sort_merge(symbol, None, mode == StagedDataFinalizeMethod.APPEND, prune_previous_versions=prune_previous_versions)
arcticdb_ext.exceptions.InternalException: E_ASSERTION_FAILURE Stream descriptor not found in pipeline context

Expected result This should suceed and be a noop.

Related issues Possibly related to: #1735, #1736

OS, Python, Arctic versions

Python: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
OS: Windows-10-10.0.22631-SP0
ArcticDB: 4.5.0rc1

vasil-pashov avatar Aug 01 '24 09:08 vasil-pashov