[MXS-397] Unsafe handling of dcb_readqueue Created: 2015-10-07  Updated: 2018-01-15  Resolved: 2016-11-30

Status: Closed
Project: MariaDB MaxScale
Component/s: Core, readwritesplit, schemarouter
Affects Version/s: 1.2.1
Fix Version/s: 2.1.0

Type: Bug Priority: Major
Reporter: martin brampton (Inactive) Assignee: martin brampton (Inactive)
Resolution: Done Votes: 0
Labels: None
Environment:

Any



 Description   

In the majority of cases the read queue for a DCB is handled without locking. This is reasonable, based on the fact that the system will only ever have a single thread processing a DCB in read mode, and such non-locking access is fundamental to the system design and its performances.

However, the use of the function poll_add_epollin_event_to_dcb() does not conform to this principle. It employs a spinlock, but this will only be effective against other uses of the same function, because other types of access to dcb_readqueue do not use a spinlock.

While it would be possible to add spinlocks in all cases, this would have an undesirable impact on performance. The mechanisms around poll_add_epollin_event_to_dcb therefore need to be reviewed to see whether a non-locking resolution can be found.



 Comments   
Comment by Johan Wikman [ 2016-11-30 ]

This is irrelevant now after the changes that have been made to the polling approach.

Generated at Thu Feb 08 03:58:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.