ChristopherSchultz commented on PR #596:
URL: https://github.com/apache/tomcat/pull/596#issuecomment-1464952161

   I've been thinking about this more and I think it could cause problems for 
people not using appId+sessionId (or just sessionId) as the primary key for the 
DB table storing the sessions. `INSERT` and `DELETE` are not required to 
include a value for the PK. Some databases can automatically-allocate a value 
for that purpose and so the existing `DELETE`+`INSERT` scheme works for them. 
But the `SELECT ... FOR UPDATE` will not because it does not include the 
table's PK.
   
   One way to fix this would be to add an optional PK column (columns?) to the 
configuration.
   
   I think this is pretty important, because databases which use PK-indexed 
organization (SQL Server, InnoDB, and others) will thrash-around if 
appId+sessionId are the PK columns, so anybody using those kinds of DBs would 
likely choose a separate PK column that doesn't cause those ugly performance 
problems.
   
   Any other thoughts?


-- 
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: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to