Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HkDb: Frames can be loaded in the wrong order #1105

Open
jlashner opened this issue Jan 23, 2025 · 0 comments · May be fixed by #1106
Open

HkDb: Frames can be loaded in the wrong order #1105

jlashner opened this issue Jan 23, 2025 · 0 comments · May be fixed by #1106

Comments

@jlashner
Copy link
Contributor

Yoshinori posted in dm-daq-support that hkdb was loading some frames in the wrong order:

Image

After looking into it, it seems as though this is caused by a single frame that has an abnormally long duration:

frame.__dict__
>> {'_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x7f914c0d6c80>,
 'agent': 'acu',
 'byte_offset': 577164031,
 'end_time': 1737422107.8764656,
 'feed': 'acu_error',
 'file': <sotodlib.io.hkdb.HkFile object at 0x7f90d2b4eec0>,
 'file_id': 47326,
 'id': 20629910,
 'start_time': 1737108927.5658438}

This long frame makes it so this query can potentially insert files out of order, since the query is order by Frame start time.

This bug can be fixed by sorting the file paths and making sure we're loading them in the proper order.

@jlashner jlashner linked a pull request Jan 23, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant