firethorn

changeset 4198:f14ed718d705 2.1.28-tap-issues

Added Notes a Test (Table Delete)
author Stelios <stv@roe.ac.uk>
date Wed Apr 17 01:13:14 2019 +0300 (2019-04-17)
parents 4d7aafcfe16d
children 7cb76899479d
files doc/notes/stv/20190416-Table-Delete-Test.txt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/doc/notes/stv/20190416-Table-Delete-Test.txt	Wed Apr 17 01:13:14 2019 +0300
     1.3 @@ -0,0 +1,487 @@
     1.4 +#
     1.5 +# <meta:header>
     1.6 +#   <meta:licence>
     1.7 +#     Copyright (c) 2018, ROE (http://www.roe.ac.uk/)
     1.8 +#
     1.9 +#     This information is free software: you can redistribute it and/or modify
    1.10 +#     it under the terms of the GNU General Public License as published by
    1.11 +#     the Free Software Foundation, either version 3 of the License, or
    1.12 +#     (at your option) any later version.
    1.13 +#
    1.14 +#     This information is distributed in the hope that it will be useful,
    1.15 +#     but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.16 +#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.17 +#     GNU General Public License for more details.
    1.18 +#
    1.19 +#     You should have received a copy of the GNU General Public License
    1.20 +#     along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1.21 +#   </meta:licence>
    1.22 +# </meta:header>
    1.23 +#
    1.24 +#
    1.25 +
    1.26 +## Testing a query on a result table, then deleting that table and testing query again
    1.27 +## Test run on Revision 4d7aafcfe16d (2.1.28-tap-issues)
    1.28 +
    1.29 +
    1.30 +# ssh -L '*:8081:Gworewia:80' Stevedore@Gworewia 
    1.31 +
    1.32 +## Schema:
    1.33 +## http://localhost:8081/firethorn/adql/schema/37093/tables/select
    1.34 +##
    1.35 +## Table: 
    1.36 +## http://localhost:8081/firethorn/adql/table/39290
    1.37 +## 
    1.38 +.. 
    1.39 +{
    1.40 +"type": "http://data.metagrid.co.uk/wfau/firethorn/types/entity/adql-table-1.0.json",
    1.41 +"formats": {
    1.42 +"votable": "http://localhost:8081/firethorn/adql/table/39290/votable",
    1.43 +"datatable": "http://localhost:8081/firethorn/adql/table/39290/datatable"
    1.44 +},
    1.45 +"metadata": {
    1.46 +"adql": {
    1.47 +"count": 10,
    1.48 +"status": "COMPLETED"
    1.49 +}
    1.50 +},
    1.51 +"query": "http://localhost:8081/firethorn/blue/query/39603",
    1.52 +"schema": "http://localhost:8081/firethorn/adql/schema/37093",
    1.53 +"depth": "PARTIAL",
    1.54 +"base": "http://localhost:8081/firethorn/jdbc/table/39289",
    1.55 +"columns": "http://localhost:8081/firethorn/adql/table/39290/columns/select",
    1.56 +"fullname": "temp.XX_V3XRF4TOX22AGAAAAFVCOLMUXE",
    1.57 +"resource": "http://localhost:8081/firethorn/adql/resource/36856",
    1.58 +"parent": "http://localhost:8081/firethorn/adql/schema/37093",
    1.59 +"root": "http://localhost:8081/firethorn/jdbc/table/39289",
    1.60 +"text": null,
    1.61 +"name": "XX_V3XRF4TOX22AGAAAAFVCOLMUXE",
    1.62 +"owner": "http://localhost:8081/firethorn/community-member/165",
    1.63 +"url": "http://localhost:8081/firethorn/adql/table/39290",
    1.64 +"self": "http://localhost:8081/firethorn/adql/table/39290",
    1.65 +"ident": "39290",
    1.66 +"created": "2019-04-16T17:24:19.770",
    1.67 +"modified": "2019-04-16T17:24:19.770"
    1.68 +},
    1.69 +..
    1.70 +
    1.71 +
    1.72 +stelios@stelios-pc:~$ python3
    1.73 +
    1.74 +
    1.75 +# -----------------------------------------------------
    1.76 +
    1.77 +import os
    1.78 +import uuid
    1.79 +import time
    1.80 +import firethorn as ftpy
    1.81 +
    1.82 +#
    1.83 +firethorn = ftpy.Firethorn(
    1.84 +    endpoint = "http://localhost:8081/firethorn"
    1.85 +    )
    1.86 +
    1.87 +#
    1.88 +# Login using a guest account.
    1.89 +firethorn.login(
    1.90 +    str(uuid.uuid4()),
    1.91 +    str(uuid.uuid4()),
    1.92 +    None
    1.93 +    )	
    1.94 +
    1.95 +# Select a specific resource by Identity (url)
    1.96 +
    1.97 +resource=firethorn.firethorn_engine.select_adql_resource_by_ident(
    1.98 +    "http://localhost:8081/firethorn/adql/resource/36856"
    1.99 +    )
   1.100 +
   1.101 +
   1.102 +# Create a new workspace.
   1.103 +workspace = firethorn.firethorn_engine.create_adql_resource(
   1.104 +    "Query resource"
   1.105 +    )
   1.106 +
   1.107 +# Select schema by Identity
   1.108 +schema=resource.select_schema_by_ident("http://localhost:8081/firethorn/adql/schema/37093")
   1.109 +
   1.110 +
   1.111 +# Import the TAP_schema into our workspace
   1.112 +workspace.import_adql_schema(
   1.113 +     schema
   1.114 + )
   1.115 +
   1.116 +
   1.117 +#
   1.118 +# Create and run a query.
   1.119 +query_str = "SELECT TOP 10 * from temp.XX_V3XRF4TOX22AGAAAAFVCOLMUXE"
   1.120 +query_obj = workspace.create_query(
   1.121 +    query_str,
   1.122 +    "COMPLETED",
   1.123 +    None,
   1.124 +    3000000
   1.125 +    )
   1.126 +print(
   1.127 +    query_obj
   1.128 +    )
   1.129 +print(
   1.130 +    query_obj.table()
   1.131 +    )
   1.132 +print(
   1.133 +    query_obj.table().count()
   1.134 +    )
   1.135 +
   1.136 +{
   1.137 +  "results": {
   1.138 +    "formats": {
   1.139 +      "datatable": "http://localhost:8081/firethorn/adql/table/42352/datatable",
   1.140 +      "votable": "http://localhost:8081/firethorn/adql/table/42352/votable"
   1.141 +    },
   1.142 +    "state": "COMPLETED",
   1.143 +    "table": "http://localhost:8081/firethorn/adql/table/42352",
   1.144 +    "count": 10
   1.145 +  },
   1.146 +  "fields": [],
   1.147 +  "columns": [],
   1.148 +  "adql": "SELECT TOP 10 *\nFROM temp.XX_V3XRF4TOX22AGAAAAFVCOLMUXE",
   1.149 +  "ident": "39611",
   1.150 +  "status": "COMPLETED",
   1.151 +  "history": [
   1.152 +    {
   1.153 +      "modified": "2019-04-16T21:46:29.069",
   1.154 +      "level": "INFO",
   1.155 +      "owner": "http://localhost:8081/firethorn/community-member/42402",
   1.156 +      "ident": "39662",
   1.157 +      "task": "http://localhost:8081/firethorn/blue/query/39611",
   1.158 +      "created": "2019-04-16T21:46:29.068",
   1.159 +      "message": null,
   1.160 +      "state": "COMPLETED",
   1.161 +      "url": "http://localhost:8081/firethorn/blue/log/entry/39662",
   1.162 +      "type": "http://data.metagrid.co.uk/wfau/firethorn/types/log-entry-1.0.json",
   1.163 +      "self": "http://localhost:8081/firethorn/blue/log/entry/39662"
   1.164 +    },
   1.165 +    {
   1.166 +      "modified": "2019-04-16T21:46:28.583",
   1.167 +      "level": "INFO",
   1.168 +      "owner": "http://localhost:8081/firethorn/community-member/42101",
   1.169 +      "ident": "39661",
   1.170 +      "task": "http://localhost:8081/firethorn/blue/query/39611",
   1.171 +      "created": "2019-04-16T21:46:28.583",
   1.172 +      "message": "Executing query",
   1.173 +      "state": "READY",
   1.174 +      "url": "http://localhost:8081/firethorn/blue/log/entry/39661",
   1.175 +      "type": "http://data.metagrid.co.uk/wfau/firethorn/types/log-entry-1.0.json",
   1.176 +      "self": "http://localhost:8081/firethorn/blue/log/entry/39661"
   1.177 +    }
   1.178 +  ],
   1.179 +  "delays": {
   1.180 +    "every": null,
   1.181 +    "first": null,
   1.182 +    "last": null
   1.183 +  },
   1.184 +  "input": "SELECT TOP 10 * from temp.XX_V3XRF4TOX22AGAAAAFVCOLMUXE",
   1.185 +  "mode": "DIRECT",
   1.186 +  "url": "http://localhost:8081/firethorn/blue/query/39611",
   1.187 +  "resource": "http://localhost:8081/firethorn/adql/resource/36863",
   1.188 +  "type": "http://data.metagrid.co.uk/wfau/firethorn/types/entity/blue-query-1.0.json",
   1.189 +  "resources": [
   1.190 +    "http://localhost:8081/firethorn/jdbc/resource/52"
   1.191 +  ],
   1.192 +  "callback": "http://localhost:8081/firethorn/callback/39611",
   1.193 +  "owner": "http://localhost:8081/firethorn/community-member/42101",
   1.194 +  "osql": "SELECT TOP 10 [FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_OICNN6LA7ZGE4AAAAFVCOLMU64] AS \"filterID\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_GA3L6QBDMJJBGAAAAFVCOLMU7I] AS \"shortName\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_LKH44AVWZ57A6AAAAFVCOLMU7Q] AS \"name\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_GANXWEZOASLXSAAAAFVCOLMU7Y] AS \"description\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_S4RM57SQGFNFIAAAAFVCOLMVAA] AS \"cutOn\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_TV6YY3AG4TXQGAAAAFVCOLMVAI] AS \"cutOff\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_WWBAXSUCWPDSEAAAAFVCOLMVAQ] AS \"aebv\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_YCSK2LNXTXZZEAAAAFVCOLMVAY] AS \"vegaToAB\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_P2BAI4NRHRD5MAAAAFVCOLMVBE] AS \"oneSecMLVg\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_AUOSHIQIJPPJ2AAAAFVCOLMVBM] AS \"isSectioned\"\nFROM [FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE]",
   1.195 +  "text": null,
   1.196 +  "workspace": "http://localhost:8081/firethorn/adql/resource/36863",
   1.197 +  "syntax": {
   1.198 +    "message": null,
   1.199 +    "status": "VALID",
   1.200 +    "friendly": null
   1.201 +  },
   1.202 +  "name": "XX_22WTU7NNLLSGUAAAAFVCQHMU3Q",
   1.203 +  "tables": [],
   1.204 +  "self": "http://localhost:8081/firethorn/blue/query/39611",
   1.205 +  "created": "2019-04-16T21:46:28.444",
   1.206 +  "modified": "2019-04-16T21:46:29.095",
   1.207 +  "limits": {
   1.208 +    "time": null,
   1.209 +    "rows": 1000000,
   1.210 +    "cells": null
   1.211 +  }
   1.212 +}
   1.213 +>>> print(
   1.214 +...     query_obj.table()
   1.215 +...     )
   1.216 +{
   1.217 +  "formats": {
   1.218 +    "datatable": "http://localhost:8081/firethorn/adql/table/42352/datatable",
   1.219 +    "votable": "http://localhost:8081/firethorn/adql/table/42352/votable"
   1.220 +  },
   1.221 +  "fullname": "temp.XX_SSRFKI547EROKAAAAFVCQHMVQE",
   1.222 +  "base": "http://localhost:8081/firethorn/jdbc/table/39301",
   1.223 +  "text": null,
   1.224 +  "root": "http://localhost:8081/firethorn/jdbc/table/39301",
   1.225 +  "metadata": {
   1.226 +    "adql": {
   1.227 +      "status": "COMPLETED",
   1.228 +      "count": 10
   1.229 +    }
   1.230 +  },
   1.231 +  "columns": "http://localhost:8081/firethorn/adql/table/42352/columns/select",
   1.232 +  "name": "XX_SSRFKI547EROKAAAAFVCQHMVQE",
   1.233 +  "owner": "http://localhost:8081/firethorn/community-member/42101",
   1.234 +  "self": "http://localhost:8081/firethorn/adql/table/42352",
   1.235 +  "created": "2019-04-16T21:46:28.610",
   1.236 +  "modified": "2019-04-16T21:46:28.611",
   1.237 +  "query": "http://localhost:8081/firethorn/blue/query/39611",
   1.238 +  "depth": "PARTIAL",
   1.239 +  "schema": "http://localhost:8081/firethorn/adql/schema/37100",
   1.240 +  "parent": "http://localhost:8081/firethorn/adql/schema/37100",
   1.241 +  "url": "http://localhost:8081/firethorn/adql/table/42352",
   1.242 +  "resource": "http://localhost:8081/firethorn/adql/resource/36864",
   1.243 +  "type": "http://data.metagrid.co.uk/wfau/firethorn/types/entity/adql-table-1.0.json",
   1.244 +  "ident": "42352"
   1.245 +}
   1.246 +>>> print(
   1.247 +...     query_obj.table().count()
   1.248 +...     )
   1.249 +10
   1.250 +
   1.251 +
   1.252 +
   1.253 +## Query Completes without issue. 
   1.254 +## Now delete table from database and run query again..
   1.255 +
   1.256 +## ssh -X stv@shepseskaf.roe.ac.uk 'rdesktop -ken-gb -g1024x600 -x l -u stelios ramses2'
   1.257 +## .. Manual Delete
   1.258 +
   1.259 +
   1.260 +#
   1.261 +# Run query again
   1.262 +
   1.263 +query_str = "SELECT TOP 10 * from temp.XX_V3XRF4TOX22AGAAAAFVCOLMUXE"
   1.264 +query_obj = workspace.create_query(
   1.265 +    query_str,
   1.266 +    "COMPLETED",
   1.267 +    None,
   1.268 +    3000000
   1.269 +    )
   1.270 +print(
   1.271 +    query_obj
   1.272 +    )
   1.273 +print(
   1.274 +    query_obj.table()
   1.275 +    )
   1.276 +print(
   1.277 +    query_obj.table().count()
   1.278 +    )
   1.279 +{
   1.280 +  "results": {
   1.281 +    "formats": {
   1.282 +      "datatable": "http://localhost:8081/firethorn/adql/table/42354/datatable",
   1.283 +      "votable": "http://localhost:8081/firethorn/adql/table/42354/votable"
   1.284 +    },
   1.285 +    "state": "EMPTY",
   1.286 +    "table": "http://localhost:8081/firethorn/adql/table/42354",
   1.287 +    "count": 0
   1.288 +  },
   1.289 +  "fields": [],
   1.290 +  "columns": [],
   1.291 +  "adql": "SELECT TOP 10 *\nFROM temp.XX_V3XRF4TOX22AGAAAAFVCOLMUXE",
   1.292 +  "ident": "39612",
   1.293 +  "status": "FAILED",
   1.294 +  "history": [
   1.295 +    {
   1.296 +      "modified": "2019-04-16T21:49:55.168",
   1.297 +      "level": "INFO",
   1.298 +      "owner": "http://localhost:8081/firethorn/community-member/42101",
   1.299 +      "ident": "39663",
   1.300 +      "task": "http://localhost:8081/firethorn/blue/query/39612",
   1.301 +      "created": "2019-04-16T21:49:55.167",
   1.302 +      "message": "Executing query",
   1.303 +      "state": "READY",
   1.304 +      "url": "http://localhost:8081/firethorn/blue/log/entry/39663",
   1.305 +      "type": "http://data.metagrid.co.uk/wfau/firethorn/types/log-entry-1.0.json",
   1.306 +      "self": "http://localhost:8081/firethorn/blue/log/entry/39663"
   1.307 +    }
   1.308 +  ],
   1.309 +  "delays": {
   1.310 +    "every": null,
   1.311 +    "first": null,
   1.312 +    "last": null
   1.313 +  },
   1.314 +  "input": "SELECT TOP 10 * from temp.XX_V3XRF4TOX22AGAAAAFVCOLMUXE",
   1.315 +  "mode": "DIRECT",
   1.316 +  "url": "http://localhost:8081/firethorn/blue/query/39612",
   1.317 +  "resource": "http://localhost:8081/firethorn/adql/resource/36863",
   1.318 +  "type": "http://data.metagrid.co.uk/wfau/firethorn/types/entity/blue-query-1.0.json",
   1.319 +  "resources": [
   1.320 +    "http://localhost:8081/firethorn/jdbc/resource/52"
   1.321 +  ],
   1.322 +  "callback": "http://localhost:8081/firethorn/callback/39612",
   1.323 +  "owner": "http://localhost:8081/firethorn/community-member/42101",
   1.324 +  "osql": "SELECT TOP 10 [FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_OICNN6LA7ZGE4AAAAFVCOLMU64] AS \"filterID\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_GA3L6QBDMJJBGAAAAFVCOLMU7I] AS \"shortName\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_LKH44AVWZ57A6AAAAFVCOLMU7Q] AS \"name\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_GANXWEZOASLXSAAAAFVCOLMU7Y] AS \"description\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_S4RM57SQGFNFIAAAAFVCOLMVAA] AS \"cutOn\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_TV6YY3AG4TXQGAAAAFVCOLMVAI] AS \"cutOff\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_WWBAXSUCWPDSEAAAAFVCOLMVAQ] AS \"aebv\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_YCSK2LNXTXZZEAAAAFVCOLMVAY] AS \"vegaToAB\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_P2BAI4NRHRD5MAAAAFVCOLMVBE] AS \"oneSecMLVg\",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_AUOSHIQIJPPJ2AAAAFVCOLMVBM] AS \"isSectioned\"\nFROM [FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE]",
   1.325 +  "text": null,
   1.326 +  "workspace": "http://localhost:8081/firethorn/adql/resource/36863",
   1.327 +  "syntax": {
   1.328 +    "message": null,
   1.329 +    "status": "VALID",
   1.330 +    "friendly": null
   1.331 +  },
   1.332 +  "name": "XX_3MS36PVMKSCL4AAAAFVCQIF324",
   1.333 +  "tables": [],
   1.334 +  "self": "http://localhost:8081/firethorn/blue/query/39612",
   1.335 +  "created": "2019-04-16T21:49:55.031",
   1.336 +  "modified": "2019-04-16T21:49:55.092",
   1.337 +  "limits": {
   1.338 +    "time": null,
   1.339 +    "rows": 1000000,
   1.340 +    "cells": null
   1.341 +  }
   1.342 +}
   1.343 +>>> print(
   1.344 +...     query_obj.table()
   1.345 +...     )
   1.346 +{
   1.347 +  "formats": {
   1.348 +    "datatable": "http://localhost:8081/firethorn/adql/table/42354/datatable",
   1.349 +    "votable": "http://localhost:8081/firethorn/adql/table/42354/votable"
   1.350 +  },
   1.351 +  "fullname": "temp.XX_7Q6EA3GNKX26AAAAAFVCQIF4OQ",
   1.352 +  "base": "http://localhost:8081/firethorn/jdbc/table/42353",
   1.353 +  "text": null,
   1.354 +  "root": "http://localhost:8081/firethorn/jdbc/table/42353",
   1.355 +  "metadata": {
   1.356 +    "adql": {
   1.357 +      "status": "CREATED",
   1.358 +      "count": -1
   1.359 +    }
   1.360 +  },
   1.361 +  "columns": "http://localhost:8081/firethorn/adql/table/42354/columns/select",
   1.362 +  "name": "XX_7Q6EA3GNKX26AAAAAFVCQIF4OQ",
   1.363 +  "owner": "http://localhost:8081/firethorn/community-member/42101",
   1.364 +  "self": "http://localhost:8081/firethorn/adql/table/42354",
   1.365 +  "created": "2019-04-16T21:49:55.189",
   1.366 +  "modified": "2019-04-16T21:49:55.189",
   1.367 +  "query": "http://localhost:8081/firethorn/blue/query/39612",
   1.368 +  "depth": "PARTIAL",
   1.369 +  "schema": "http://localhost:8081/firethorn/adql/schema/37100",
   1.370 +  "parent": "http://localhost:8081/firethorn/adql/schema/37100",
   1.371 +  "url": "http://localhost:8081/firethorn/adql/table/42354",
   1.372 +  "resource": "http://localhost:8081/firethorn/adql/resource/36864",
   1.373 +  "type": "http://data.metagrid.co.uk/wfau/firethorn/types/entity/adql-table-1.0.json",
   1.374 +  "ident": "42354"
   1.375 +}
   1.376 +>>> print(
   1.377 +...     query_obj.table().count()
   1.378 +...     )
   1.379 +-1
   1.380 +
   1.381 +
   1.382 +## Query Failed, but does not hang. Fail was properly propagated to Firethorn
   1.383 +##
   1.384 +
   1.385 +## Check OGSADAI logs..
   1.386 +
   1.387 +2019-04-16 21:49:55,543 DEBUG sql.SQLQueryActivity [pool-1-thread-54,processIteration:259] SQL QUERY: SELECT TOP 10 [FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_OICNN6LA7ZGE4AAAAFVCOLMU64] AS "filterID",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_GA3L6QBDMJJBGAAAAFVCOLMU7I] AS "shortName",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_LKH44AVWZ57A6AAAAFVCOLMU7Q] AS "name",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_GANXWEZOASLXSAAAAFVCOLMU7Y] AS "description",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_S4RM57SQGFNFIAAAAFVCOLMVAA] AS "cutOn",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_TV6YY3AG4TXQGAAAAFVCOLMVAI] AS "cutOff",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_WWBAXSUCWPDSEAAAAFVCOLMVAQ] AS "aebv",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_YCSK2LNXTXZZEAAAAFVCOLMVAY] AS "vegaToAB",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_P2BAI4NRHRD5MAAAAFVCOLMVBE] AS "oneSecMLVg",[FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE].[XX_AUOSHIQIJPPJ2AAAAFVCOLMVBM] AS "isSectioned"
   1.388 +FROM [FirethornUserdataTAP20181212LIVE].[dbo].[XX_V3XRF4TOX22AGAAAAFVCOLMUXE]
   1.389 +2019-04-16 21:49:55,543 DEBUG sql.SQLQueryActivity [pool-1-thread-54,processIteration:262] Initialising query
   1.390 +2019-04-16 21:49:55,544 DEBUG sql.SQLQueryActivity [pool-1-thread-54,processIteration:274] Executing query
   1.391 +2019-04-16 21:49:55,544 DEBUG sql.SQLQueryActivity [pool-1-thread-54,executeQuery:364] Creating CallableStatement for query
   1.392 +2019-04-16 21:49:55,545 DEBUG sql.SQLQueryActivity [pool-1-thread-54,executeQuery:369] Submitting CallableStatement to ExecutorService
   1.393 +2019-04-16 21:49:55,546 DEBUG sql.SQLQueryActivity [pool-1-thread-54,executeQuery:376] Initiating CallableStatement and starting background execution
   1.394 +2019-04-16 21:49:55,549 DEBUG sql.SQLQueryActivity [pool-1-thread-54,executeQuery:390] CallableStatement encountered problem in query execution
   1.395 +2019-04-16 21:49:55,549 DEBUG sql.SQLQueryActivity [pool-1-thread-54,executeQuery:391] Original cause [java.sql.SQLException]
   1.396 +2019-04-16 21:49:55,549 DEBUG sql.SQLQueryActivity [pool-1-thread-54,processIteration:323] Caught a SQLException, wrapping it in an ActivitySQLUserException
   1.397 +2019-04-16 21:49:55,550 DEBUG activity.MatchedIterativeActivity [pool-1-thread-54,debug:84] performing clean-up
   1.398 +2019-04-16 21:49:55,550 DEBUG sql.SQLQueryActivity [pool-1-thread-54,cleanUp:475] Shutting down ExecutorService
   1.399 +2019-04-16 21:49:55,550 DEBUG sql.SQLQueryActivity [pool-1-thread-54,cleanUp:480] Closing Statement
   1.400 +2019-04-16 21:49:55,551 DEBUG sql.SQLQueryActivity [pool-1-thread-54,cleanUp:487] Releasing Connection
   1.401 +2019-04-16 21:49:55,552 DEBUG event.LoggingActivityListener [pool-1-thread-54,debug:84] uk.org.ogsadai.activity.sql.ActivitySQLUserException: The activity encountered a problem while interacting with a relational database.
   1.402 +	at uk.ac.roe.wfau.firethorn.ogsadai.activity.server.sql.SQLQueryActivity.processIteration(SQLQueryActivity.java:324)
   1.403 +	at uk.org.ogsadai.activity.MatchedIterativeActivity.process(MatchedIterativeActivity.java:90)
   1.404 +	at uk.org.ogsadai.activity.event.EventfulActivity.process(EventfulActivity.java:78)
   1.405 +	at uk.org.ogsadai.activity.concurrency.ActivityProcessingTask.call(ActivityProcessingTask.java:81)
   1.406 +	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   1.407 +	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   1.408 +	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   1.409 +	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   1.410 +	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   1.411 +	at java.lang.Thread.run(Thread.java:748)
   1.412 +Caused by: java.sql.SQLException: Invalid object name 'FirethornUserdataTAP20181212LIVE.dbo.XX_V3XRF4TOX22AGAAAAFVCOLMUXE'.
   1.413 +	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
   1.414 +	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
   1.415 +	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
   1.416 +	at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
   1.417 +	at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:505)
   1.418 +	at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1427)
   1.419 +	at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
   1.420 +	at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
   1.421 +	at uk.org.ogsadai.activity.sql.CallableStatement.call(CallableStatement.java:66)
   1.422 +	at uk.ac.roe.wfau.firethorn.ogsadai.activity.server.sql.SQLQueryActivity$ChaoticCallableStatement.call(SQLQueryActivity.java:427)
   1.423 +	at uk.ac.roe.wfau.firethorn.ogsadai.activity.server.sql.SQLQueryActivity$ChaoticCallableStatement.call(SQLQueryActivity.java:416)
   1.424 +	... 4 more
   1.425 +
   1.426 +
   1.427 +## How does this compare to OGSADAI log from the "823 Fatal Error" query
   1.428 +
   1.429 +019-03-19 12:57:04,552 DEBUG sql.SQLQueryActivity [pool-1-thread-34,executeQuery:374] Initiating CallableStatement and starting background execution
   1.430 +2019-03-19 12:57:04,609 DEBUG context.RequestContextFactory [http-nio-8080-exec-10,createContext:62] createContext(HttpServletRequest)
   1.431 +2019-03-19 12:57:04,609 DEBUG context.RequestContextFactory [http-nio-8080-exec-10,createContext:64] remote [172.18.0.5]
   1.432 +2019-03-19 12:57:06,094 DEBUG sql.SQLQueryActivity [pool-1-thread-34,executeQuery:387] CallableStatement encountered problem in query execution
   1.433 +2019-03-19 12:57:06,094 DEBUG sql.SQLQueryActivity [pool-1-thread-34,executeQuery:388] Original cause [java.sql.SQLException]
   1.434 +2019-03-19 12:57:06,094 DEBUG sql.SQLQueryActivity [pool-1-thread-34,processIteration:321] Caught a SQLException, wrapping it in an ActivitySQLUserException
   1.435 +2019-03-19 12:57:06,094 DEBUG activity.MatchedIterativeActivity [pool-1-thread-34,debug:84] performing clean-up
   1.436 +2019-03-19 12:57:06,094 DEBUG sql.SQLQueryActivity [pool-1-thread-34,cleanUp:463] Shutting down ExecutorService
   1.437 +2019-03-19 12:57:06,095 DEBUG sql.SQLQueryActivity [pool-1-thread-34,cleanUp:468] Closing Statement
   1.438 +2019-03-19 12:57:06,096 WARN  activity.MatchedIterativeActivity [pool-1-thread-34,warnExceptionAndChildren:343] #1553000226096:535# There was a problem cleaning up the activity instance (activity name uk.org.ogsadai.SQLQuery, instance name uk.org.ogsadai.SQLQuery-ogsadai-3ae5cbc8-cb29-46d5-9def-b6874f6e351b).
   1.439 +2019-03-19 12:57:06,096 WARN  activity.MatchedIterativeActivity [pool-1-thread-34,warnExceptionAndChildren:343] #1553000226096:535# java.sql.SQLException: Invalid state, the Connection object is closed.
   1.440 +2019-03-19 12:57:06,097 DEBUG event.LoggingActivityListener [pool-1-thread-34,debug:84] uk.org.ogsadai.activity.sql.ActivitySQLUserException: The activity encountered a problem while interacting with a relational database.
   1.441 +	at uk.ac.roe.wfau.firethorn.ogsadai.activity.server.sql.SQLQueryActivity.processIteration(SQLQueryActivity.java:322)
   1.442 +	at uk.org.ogsadai.activity.MatchedIterativeActivity.process(MatchedIterativeActivity.java:90)
   1.443 +	at uk.org.ogsadai.activity.event.EventfulActivity.process(EventfulActivity.java:78)
   1.444 +	at uk.org.ogsadai.activity.concurrency.ActivityProcessingTask.call(ActivityProcessingTask.java:81)
   1.445 +	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   1.446 +	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   1.447 +	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   1.448 +	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   1.449 +	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   1.450 +	at java.lang.Thread.run(Thread.java:748)
   1.451 +Caused by: java.sql.SQLException: Warning: Fatal error 823 occurred at Mar 19 2019 12:57PM. Note the error and time, and contact your system administrator.
   1.452 +	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
   1.453 +	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
   1.454 +	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
   1.455 +	at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
   1.456 +	at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:505)
   1.457 +	at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1427)
   1.458 +	at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
   1.459 +	at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
   1.460 +	at uk.org.ogsadai.activity.sql.CallableStatement.call(CallableStatement.java:66)
   1.461 +	at uk.ac.roe.wfau.firethorn.ogsadai.activity.server.sql.SQLQueryActivity$ChaoticCallableStatement.call(SQLQueryActivity.java:415)
   1.462 +	at uk.ac.roe.wfau.firethorn.ogsadai.activity.server.sql.SQLQueryActivity$ChaoticCallableStatement.call(SQLQueryActivity.java:404)
   1.463 +	... 4 more
   1.464 +
   1.465 +
   1.466 +## Some of the differences I see are:
   1.467 +## The second case (Fatal 823) has the following lines which I dont see equivalent here
   1.468 +
   1.469 +..
   1.470 +2019-03-19 12:57:04,609 DEBUG context.RequestContextFactory [http-nio-8080-exec-10,createContext:62] createContext(HttpServletRequest)
   1.471 +..
   1.472 +2019-03-19 12:57:06,096 WARN  activity.MatchedIterativeActivity [pool-1-thread-34,warnExceptionAndChildren:343] #1553000226096:535# There was a problem cleaning up the activity instance (activity name uk.org.ogsadai.SQLQuery, instance name uk.org.ogsadai.SQLQuery-ogsadai-3ae5cbc8-cb29-46d5-9def-b6874f6e351b).
   1.473 +2019-03-19 12:57:06,096 WARN  activity.MatchedIterativeActivity [pool-1-thread-34,warnExceptionAndChildren:343] #1553000226096:535# java.sql.SQLException: Invalid state, the Connection object is closed.
   1.474 +..
   1.475 +
   1.476 +
   1.477 +
   1.478 +##  On the other hand this test has the following lines which dont appear in the (823) example
   1.479 +..
   1.480 +2019-04-16 21:49:55,551 DEBUG sql.SQLQueryActivity [pool-1-thread-54,cleanUp:487] Releasing Connection
   1.481 +..
   1.482 +
   1.483 +
   1.484 +## Other than that they look similar, except for the different Error message:
   1.485 +
   1.486 +    "Warning: Fatal error 823 occurred at Mar 19 2019 12:57PM. Note the error and time, and contact your system administrator."
   1.487 +         vs
   1.488 +    "Invalid object name 'FirethornUserdataTAP20181212LIVE.dbo.XX_V3XRF4TOX22AGAAAAFVCOLMUXE'."
   1.489 +
   1.490 +