Opened 9 years ago

Closed 8 years ago

#257 closed enhancement (fixed)

SQL table and procedure enhancements

Reported by: gegorbet Owned by: dzollars
Priority: major Milestone: future
Component: ultrascan3 Version:
Keywords: review Cc:

Description

The following additions to procedures involve first adding new fields to some tables. So, each of the fields listed would have to be added to the table first and then added to the get_*_desc procedure.

Model (get_model_desc) - TINYINT monteCarlo (0|1), CHAR(36) requestGUID

Noise (get_noise_desc) - TEXT description

Change History (10)

comment:1 follow-up: Changed 9 years ago by dzollars

  • Status changed from new to assigned

I'm not clear on what the model.requestGUID would be. Is that the HPCAnalysisRequestGUID? Right now the stored routines don't access any of the HPC tables.

comment:2 in reply to: ↑ 1 Changed 9 years ago by gegorbet

Replying to dzollars:

I'm not clear on what the model.requestGUID would be. Is that the HPCAnalysisRequestGUID? Right now the stored routines don't access any of the HPC tables.

Strictly speaking, the model.requestGUID is the requestGUID carried in the us_model object. For backend, it is taken from parsing the input HPC request XML (tag "request", attribute "guid"). For frontend, it is generated by us_2dsa for a session. It is the same for all models generated by a single analysis run. It is primarily used to identify models that were generated by the same run (e.g., all monteCarlo or fit-meniscus models for a run). It would have to be added to "new_model" and "update_model" APIs, as well as get_model_desc (and, maybe, get_model_info).

comment:3 Changed 8 years ago by gegorbet

  • Priority changed from minor to major

The priority for these changes has increased. Ticket #303 reports slowness in model loading that is directly related to the missing fields in model and noise tables.

Again: we need monteCarlo and requestGUID fields for models; and a description field for noises.

Without these fields, it is necessary to do a second pass at models, calling get_model_info for each model in order to correctly handle composite MC models. In noise loading, it is currently necessary to back-reference models in order to determine noise description fields.

comment:4 Changed 8 years ago by dzollars

With the decision to rely on the model description field, which is already returned by get_model_desc, is that sufficient?

comment:5 Changed 8 years ago by dzollars

  • Keywords review added

comment:6 Changed 8 years ago by gegorbet

  • Resolution set to fixed
  • Status changed from assigned to closed

The use of the model description field to infer the monteCarlo flag and analysisID (formerly requestGUID) is sufficient. It would still be handy to have the noise description be part of the noise table so that it could be fetched with get_noise_desc. But that, too, can be inferred in a slightly more round-about way.

So, I think this ticket can be closed. If noise description determination shows itself to be too costly, we can open a new ticket.

comment:7 Changed 8 years ago by dzollars

  • Resolution fixed deleted
  • Status changed from closed to reopened

It is easy enough to add a noise description field. Stored procedures new_noise, update_noise, get_noise_desc, and get_noise_info are affected. I have made a small change to utils/us_noise.cpp so that the parameters for new_noise and update_noise will line up at least, but I expect that you will want to make further changes to load actual descriptions into the database. I didn't make any changes to ultrascan3 files that use get_noise_desc or get_noise_info---in the stored procedure API I put these return values at the end, so it shouldn't affect anything you have in there now.

Whenever the structure of the stored procedure API changes we should come out with new versions on all platforms. I propose to wait until all relevant changes to the noise files are in place.

comment:8 Changed 8 years ago by gegorbet

I made the further change to us_noise.cpp to store an actual description in the database. Tests with us_2dsa and us_manage_data confirm that it is being stored and that get_noise_desc fetches it correctly.

I am satisfied that the addition of description to the noise table is functioning. What remains to be done is to store a description value when LIMS processes backend noise output.

comment:9 Changed 8 years ago by dzollars

I have just finished updating the cleanup routine to store a description that is returned from the back end into a noise file record. Tested with one short job and seems to work---description is there in the noise table.

This code change will affect all instances.

comment:10 Changed 8 years ago by gegorbet

  • Resolution set to fixed
  • Status changed from reopened to closed

I verified with my own run that LIMS is updating the noise table with a description now.

I am resolving this ticket as fixed.

Note: See TracTickets for help on using tickets.