jamesesilvia / CS542

Database Management Systems
1 stars 1 forks source link

Clients getting the results from other clients #6

Closed tcarroll25 closed 9 years ago

tcarroll25 commented 9 years ago

If multiple client actions are performed in quick succession then sometimes one client will get the results back from another client and vice versa. For example:

A performs REMOVE B performs GET A gets failed GET B gets successful REMOVE

tcarroll25 commented 9 years ago

We were creating the request_id in the threads handling the client so if two quick requests were made then they would both have the same request_id and either client could get the response.

I moved the request_id creation to the relation class so it gives out request_id's when the request occurs. Mutex locks prevent duplicate IDs.

Tested with 3 clients doing accesses in quick succession.