You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Errors during the "create new imaging dataset" UI process leaves the database in a partially created state.
To Reproduce
Steps to reproduce the behavior:
Open the CreateNewImagingDatasetUI
Fill-in the details and load a template which has an error (e.g. duplicate column listed)
UI fails with "duplicate column" error
Fix error in template and re-try
UI fails with "table already exists"
Edit:
Some of the tables may be created
Some of the RDMP catalogues may be created
Expected behavior
If an error occurs, the database should not be left in an intermediate state.
RDMP.Dicom Plugin Version
v3.0.0
RDMP Version
v5.0.1
Stack Trace
Table 'XA_StudyTable' already exists at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in /_/src/MySqlConnector/Core/ResultSet.cs:line 50 at MySqlConnector.MySqlDataReader.ActivateResultSet(CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 135 at MySqlConnector.MySqlDataReader.CreateAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary`2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 444 at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(IReadOnlyList`1 commands, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 60 at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 266 at MySqlConnector.MySqlCommand.ExecuteNonQuery() in /_/src/MySqlConnector/MySqlCommand.cs:line 101 at FAnsi.Discovery.DiscoveredDatabaseHelper.ExecuteBatchNonQuery(String sql, DbConnection conn, DbTransaction transaction, Dictionary`2& performanceFigures, Int32 timeout) at FAnsi.Discovery.DiscoveredDatabaseHelper.CreateTable(CreateTableArgs args) at FAnsi.Discovery.DiscoveredDatabase.CreateTable(CreateTableArgs args) at FAnsi.Discovery.DiscoveredDatabase.CreateTable(String tableName, DatabaseColumnRequest[] columns, String schema, IDatabaseColumnRequestAdjuster adjuster) at DicomTypeTranslation.TableCreation.ImagingTableCreation.CreateTable(DiscoveredTable expectedTable, ImageTableTemplate tableTemplate) at Rdmp.Dicom.CommandExecution.ExecuteCommandCreateNewImagingDataset.Execute() at Rdmp.Dicom.CommandExecution.ExecuteCommandCreateNewImagingDatasetSuite.Execute() at Rdmp.Dicom.UI.CreateNewImagingDatasetUI.CreateSuite(ImageTableTemplateCollection template) at Rdmp.Dicom.UI.CreateNewImagingDatasetUI.btnCreateSuiteWithTemplate_Click(Object sender, EventArgs e)
The text was updated successfully, but these errors were encountered:
Thanks yeah should be possible to do a better job of tidyup. But need to be careful to only delete stuff definetly created as part of the process. Don't want to drop our CT_ImageTable because we tried to create the template with CT_ prefix by accident
Also probably have to think about fringe cases e.g. where user account has CREATE but not DROP
It would be nice to do it all in a transaction in the DBMS but not all DBMS will let you do DDL operations in a transaction with rollback
Describe the bug
Errors during the "create new imaging dataset" UI process leaves the database in a partially created state.
To Reproduce
Steps to reproduce the behavior:
Edit:
Expected behavior
If an error occurs, the database should not be left in an intermediate state.
RDMP.Dicom Plugin Version
v3.0.0
RDMP Version
v5.0.1
Stack Trace
The text was updated successfully, but these errors were encountered: