Repository navigation
Conversation
|
|
||
| try: | ||
| try: | ||
| for q in queries: |
There was a problem hiding this comment.
the reason why this was a loop is because it was only practical to remove things on smaller transactions rather than 1 giant transaction. I think that is still the case, but we can try. @venkat-murty any thoughts?
In any case, I think this change is good because this is the end goal: a simple query and transaction that removes everything.
If we see that it is not practical to remove everything on a single transaction, we can implement something that deletes 10000 things at a time, check the schema, moves on the next 10000s, and iterate.
There was a problem hiding this comment.
If we have enough memory then it should not be a problem. If we are deleting n objects then it will create in-memory n objects + an object for every connection + an object for all the connected nodes.
There was a problem hiding this comment.
I would suggest limiting by some using limit = x, safer.
There was a problem hiding this comment.
Another problem, a large delete can take a long time (so timeouts are possible) and you have no idea if the system is progressing.
In addition, we (should) would add time limits on queries for system stability in near future.
There was a problem hiding this comment.
I would suggest limiting by some using limit = x, safer.
Yes, loops with a limit would be best, it can be in a followup PR too.
| set -u | ||
| set -e | ||
| #set -u | ||
| #set -e |
There was a problem hiding this comment.
I think this change will make CI pass even after failure on tests.
There was a problem hiding this comment.
Thats true. The problem i was trying to address is that script should continue to upload aperturedb stuff to s3 even after failures in prev steps . I suppose I need to do a bash OR or something
Do you have a better idea?
There was a problem hiding this comment.
nice, this reminded me I had the same issue. Here is how I solved it: https://github.com/aperture-data/athena/blob/develop/benchmarks/docker/scripts/start.sh#L49 (also, check the comment at the top of the file 🤣 )
| {"DeletePolygon": cmd}, | ||
| {"DeleteFrame": cmd}, | ||
| {"DeleteEntity": cmd}, | ||
| {"GetSchema": {"refresh": True}} |
There was a problem hiding this comment.
@venkat-murty assuming all deletes worked, will GetSchema return the new schema after all the deletes?
There was a problem hiding this comment.
Yes. If we have any delayed deletes (which we want for descriptors), get schema will return that descriptors exist.
There was a problem hiding this comment.
ok, so we are good for now. Once we have delayed deletes, we revisit the best method for removing all objects.
| {"DeleteBoundingBox": cmd}, | ||
| {"DeletePolygon": cmd}, | ||
| {"DeleteFrame": cmd}, | ||
| {"GetSchema": {"refresh": True}} |
There was a problem hiding this comment.
Do we want to perhaps have the GetSchema run a a second command, outside of the transaction to verify afterwards?
| echo "====================" | ||
| echo "Log file: $i" | ||
| echo "====================" | ||
| cat $i |
There was a problem hiding this comment.
if you use cat -n it will print the lines numbers
No description provided.