Error "There is already an object named 'DELETED_META_XXX' in the database" when uploading data
In qa:stable when I am trying to upload data to any of the DSD_NASEC10 dataflows, I am getting the error:
transfer-6b7859dc58-njz6w 13/11/2023 02:17:24PM ERROR There is already an object named 'DELETED_META_9902_A' in the database.
transfer-6b7859dc58-njz6w 13/11/2023 02:17:24PM WARN The processing of observations was stopped and dropped due to one or more errors. Please read the details of the error(s) to see how to resolve it/them.
transfer-6b7859dc58-njz6w 13/11/2023 02:17:24PM ERROR Exception of type 'DotStat.Transfer.Exception.TransferFailedException' was thrown.
OECD.SDD.NAD_DSD_NASEC10_DF_TABLE14_1.0_complete_2023-11-10_16-23-02.csv.zip
reproducible in qa:stable
, here is the full error logs: response_1699887809405.json
The same issue also happens when trying to re-initialising an existing dataflow (https://transfer-qa.siscc.org/2/init/dataflow), which, .e.g, results in :
{
"requestId": 21654,
"action": "InitDataFlow",
"artefact": "OECD:DF_JENS(1.1)",
"sourceDataspace": null,
"destinationDataspace": "qa:stable",
"sourceData": null,
"submissionTime": "2023-11-13T19:23:41.85",
"executionStart": "2023-11-13T19:23:41.873",
"executionEnd": "2023-11-13T19:23:42.133",
"executionStatus": "Completed",
"outcome": "Error",
"logs": [
{
"id": 21654,
"userEmail": null,
"date": "2023-11-13T19:23:42.123",
"level": "ERROR",
"server": "transfer-6b7859dc58-njz6w",
"logger": "DotStat.Db.Service.DotStatDbService+<TryNewTransaction>d__3.MoveNext",
"message": "There is already an object named 'DELETED_META_7734_A' in the database.",
"exception": "System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'DELETED_META_7734_A' in the database.\n at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\n at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\n at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\n at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)\n at System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult asyncResult)\n at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)\n--- End of stack trace from previous location ---\n at DotStat.Db.DB.DotStatDbBase`1.ExecuteNonQuerySqlWithParamsAsync(String command, CancellationToken cancellationToken, DbParameter[] parameters)\n at DotStat.Db.DB.DotStatDbBase`1.ExecuteNonQuerySqlWithParamsAsync(String command, CancellationToken cancellationToken, DbParameter[] parameters)\n at DotStat.Db.DB.DotStatDbBase`1.ExecuteNonQuerySqlWithParamsAsync(String command, CancellationToken cancellationToken, DbParameter[] parameters)\n at DotStat.Db.DB.DotStatDbBase`1.ExecuteNonQuerySqlAsync(String command, CancellationToken cancellationToken)\n at DotStat.Db.Engine.SqlServer.SqlMsdEngine.BuildDeletedTable(Dsd dsd, Char targetVersion, SqlDotStatDb dotStatDb, CancellationToken cancellationToken)\n at DotStat.Db.Engine.MsdEngineBase`1.CreateDynamicDbObjects(Dsd dsd, TDotStatDb dotStatDb, CancellationToken cancellationToken)\n at DotStat.Db.Repository.SqlServer.SqlArtefactRepository.VerifyAndCreateOrUpdateMetadataDynamicTables(Dsd dsd, Boolean metaDataTableExists, CancellationToken cancellationToken)\n at DotStat.Db.Service.DotStatDbService.FillDbIdsAndCreateMissingDbObjects(IImportReferenceableStructure referencedStructure, IMappingStoreDataAccess mappingStoreDataAccess, CancellationToken cancellationToken, Boolean skipDsd)\n at DotStat.Db.Service.DotStatDbService.TryNewTransaction(Transaction transaction, IImportReferenceableStructure importReferenceStructure, IMappingStoreDataAccess mappingStoreDataAccess, CancellationToken cancellationToken, Boolean onlyLockTransaction)\nClientConnectionId:f4a93330-bc38-4733-8fc9-e2c94196df86\nError Number:2714,State:6,Class:16"
}
],
"lastUpdated": "2023-11-13T19:23:42.133"
}
Edited by Jens Dossé