Commit Graph

7 Commits

Author SHA1 Message Date
Gabor Apati-Nagy
aefed11165 Revert "CA-149867: Invoke on MainWindow instead of various controls"
This reverts commit 92f0499911.
2015-04-16 14:17:02 +01:00
Gabor Apati-Nagy
92f0499911 CA-149867: Invoke on MainWindow instead of various controls
We observed that some threads can reach deadlock-ish state after they have Invoked into a control's UI thread. When it happens they are all in a waiting for join or in sleep state for very long time, although there should not be any deadlock situations.
It seems this has something to do with multiple parent controls and with which control we invoked on. This should not make a difference, because we have got one UI thread (for MainWindow) they should wait for, but we have seen it does.

The solution that fixed this issue was to invoke on the MainWindow instead of various controls (see a4fe507adf ).

This changeset is changing all our Invokes to invoke into MainWindow
instead of a control itself. (MainWindow's UI thread is the only UI thread
all Control is using in XenCenter)
This changeset should be in place until we have found the root cause or the exact reason for the above.
2015-04-08 15:16:10 +01:00
Mihaela Stoica
9987ea8e7b CA-152052: Fix the issue where the License Manager showed the wrong state when assigning/releasing license from pool
Correction following code review: When a host collection changes, update all rows containing the hosts changed. This will cover the case when the License Manager shows all members of a pool on separate rows for pre-6.2 versions of XenServer.

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2014-11-25 17:25:32 +00:00
Mihaela Stoica
65b4ef1f37 CA-152052: Fix the issue where the License Manager showed the wrong state when assigning/releasing license from pool
The problem was that the License Manager was listening to PropertyChanged events on the master only, not on slaves.
When the master's properties change (e.g. edition) we update the row in the license manager; but in some cases a slave (or more) hasn't been updated yet (as it may be updated in another event.from) and we think that the pool is partially updated.
Our solution is to listen to Host BatchCollectionChanged event, which is triggered once per cache update for the host collection (it any property changed for any of the hosts).
The sleep in the ApplyLicenseEditionAction is not needed anymore, nor is the extra call to update the cell after the action is completed, because the cell is getting updated correctly on the BatchCollectionChanged event.

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2014-11-24 16:57:42 +00:00
Mihaela Stoica
8e19193a2a CA-137470: Fixed unhandled exception raised by pressing space key on gridview of License Manager.
- Added a 'refresh grid' parameter to UpdateRow() which indicates if a sort and refresh of the grid is necessary.
- A sort and refresh is not needed when the user selects a server by pressing the space key or by mouse, but it is needed when the information displayed has changed, for example when the license has changed.
- Also solved a possible null reference exception in CheckableDataGridViewController.ReplaceStoredRow(), by returning -1 if the index is not within the rows range.

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2014-07-04 11:10:46 +01:00
Mihaela Stoica
c09c2fb044 XOP-461: Trying to fix the Invalid Operation Exception raised in license dialog (most probably a threading issue)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2013-11-05 16:21:10 +00:00
Mihaela Stoica
bd36a85bff CP-4816: Initial commit to git repo
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2013-06-24 12:41:48 +01:00