Skip to content

search.sh --count --count-by-time in CLP-JSON package would fail with missing field #1859

@junhaoliao

Description

@junhaoliao

Bug

./sbin/search.sh --count --count-by-time 1 1

Container clp-json-x86_64-v070-clp-runtime-run-90315c5d71ec Creating 
Container clp-json-x86_64-v070-clp-runtime-run-90315c5d71ec Created 
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/opt/clp/lib/python3/site-packages/clp_package_utils/scripts/native/search.py", line 84, in create_and_monitor_job_in_db
    print(f"tags: {document['group_tags']} count: {document['records'][0]['count']}")
KeyError: 'group_tags'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/opt/clp/lib/python3/site-packages/clp_package_utils/scripts/native/search.py", line 367, in <module>
    sys.exit(main(sys.argv))
  File "/opt/clp/lib/python3/site-packages/clp_package_utils/scripts/native/search.py", line 318, in main
    asyncio.run(
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/opt/clp/lib/python3/site-packages/clp_package_utils/scripts/native/search.py", line 216, in do_search
    await run_function_in_process(
  File "/opt/clp/lib/python3/site-packages/clp_package_utils/scripts/native/utils.py", line 44, in run_function_in_process
    return await fut
KeyError: 'group_tags'
2026-01-10T10:55:03.683 ERROR [search] Search failed.

CLP version

v0.7.0

Environment

ubuntu 22.04

Reproduction steps

wget https://github.com/y-scope/clp/releases/download/v0.7.0/clp-json-x86_64-v0.7.0.tar.gz
tar xvf clp-json-x86_64-v0.7.0.tar.gz 
cd clp-json-x86_64-v0.7.0/

./sbin/start-clp.sh 
./sbin/compress.sh --timestamp-key timestamp ~/samples/postgresql.jsonl 
./sbin/search.sh --count --count-by-time 1 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions