carloea2 opened a new issue, #8158:
URL: https://github.com/apache/texera/issues/8158

   ### What happened?
   
   The public hub counts GET endpoint inserts a zero row when an entity has no 
stored view count. For an unknown workflow or dataset ID, that read-side insert 
violates the view-count foreign key and returns 500. Other missing counts 
already return zero without writing.
   
   Before: unknown ID view count -> insert zero row -> foreign-key failure -> 
500
   After: unknown ID view count -> return zero without writing -> 200
   
   ### How to reproduce?
   
   1. Run the current main branch locally.
   2. Request hub counts for workflow ID 2147483647 with action type view.
   3. Observe HTTP 500 and a workflow view-count foreign-key violation.
   4. Repeat with action type like and observe HTTP 200 with a zero count.
   5. The same view request for an unknown dataset ID also returns 500.
   
   ### Version/Branch
   
   1.3.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash
   
   98588bf2ab49aac65ebf002496eb057670e6fc07
   
   ### Relevant log output
   
   insert into workflow_view_count (wid, view_count) values (?, ?)
   ERROR: insert or update on table workflow_view_count violates foreign key 
constraint workflow_view_count_wid_fkey
   Detail: Key (wid)=(2147483647) is not present in table workflow.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to