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

Retrieving records without stop_time #564

Open
rkleinem opened this issue Nov 23, 2023 · 2 comments
Open

Retrieving records without stop_time #564

rkleinem opened this issue Nov 23, 2023 · 2 comments

Comments

@rkleinem
Copy link
Collaborator

Hi,
I was just testing the QueuedAuditorClient (#240) and found that we allow to submit records without a stop_time to AUDITOR, but don't have a way to retrieve them again.

When using /record?state=started&since={date} we should get records without a stop_time, right?
But in auditor/src/routes/get_since.rs line 83 we have

WHERE a.start_time > $1 and a.runtime IS NOT NULL

which filters out any record without stop_time.
I think we should drop the and a.runtime IS NOT NULL?

@QuantumDancer
Copy link
Collaborator

Hey, yes I think you're right. It may make sense to filter out these records when we query for records that have been stopped since a given point in time (i.e. /record?state=stopped&since={date}) but not in the case of state=started.

We actually stumbled across this while extending the query options when retrieving records (see #525, this will be merged in the next few days). Right now, we replicated the old behavior, but we wanted to revisit this anyways in the future:

https://github.com/raghuvar-vijay/AUDITOR/blob/753f3f33a2250126eb02a9dabb2ad14ab887547a/auditor/src/routes/advanced_record_filters.rs#L171-L185

@rkleinem
Copy link
Collaborator Author

It may make sense to filter out these records when we query for records that have been stopped since a given point in time (i.e. /record?state=stopped&since={date}) but not in the case of state=started

Yes, I agree, that sounds good.
Anyway, it's not a pressing matter. Revisiting in the future sounds fine.

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

No branches or pull requests

2 participants