-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration to Go implementation of DBS server #10843
Comments
@vkuznet Valentin, do I understand it right that this issue is more like a checklist and supposed to track the final migration in the production system?
Regarding this point. I think we should have a WMCore issue to correct those data types on our side. It should be transparent, since DBSServer is already doing the casting step when needed. So the sooner we have it implemented, the better for the Go implementation migration. Can you open yet another issue please? |
Yes, it is something we must check before the migration to avoid hidden failures in production workflows. And, yes, I opened dedicated feature request WMCore#10844 for data-types issue. |
@belforte please review this issue as it relates to CRAB too. This is high-level issue where you can find details about concrete issues related to migration, therefore I only provide this one to you for your review, but I expect that CRAB team can evaluate the usage of new DBS server and ensure that CRAB tools will be complaint with it. |
as reference, I have created a GH project for CRAB on transitioning to new DBS-Go server, feel free to review/comment/add issues there https://github.com/dmwm/CRABServer/projects/8 |
@belforte , @amaltaro somehow your comments din't appear in a ticket. So, I'll paste them here and answer to both: From @stefano: From @amaltaro I'll answer you both. If you use DBS client which does not perform JSON data-type validation and can only work with DBS custom Python server because it does not follow standard and perform bizzarre things it does not mean that you should not use proper data-types. I will repost my reply from email thread explaining why it is dangerous: In python I can do
Now, please explain to me why run number, file size or lumi number should be a string? Does |
I am confused. Is the plan to use existing DBS Python Client with new server, or to update/rewrite it ? Or do you suggest that we replace it with direct http calls to new server ? AFAIK current DBS Client does not take JSON as input, but python dictionaries, So let's make it clear what the procedure is, then we can dwell on various lumi formats BTW, I though we (well you!) were getting this chance also to rework the I tend to agree with Yuyi that maybe original DBS specifications were too lax, but Is this as simple as "current server may accept junk and try to send it to Oracle, |
@belforte let's break things piece by piece:
Now about issues you listed. They are part of the issue I explain here and contribute to DBS performance degradation. For instance, if you send gigabtic list of strings which should be converted to ints, DBS server performs casting for every single value which leads to extra CPU cycles, extra memory usage, etc. As part of Go server implementation I did consider all known issues with DBS server, this is why I demonstrated that DBS memory footprint can drop from 10GB to less than 200MB, etc. I'd like to avoid discussing here all different issues I find and only concentrate on discussion for a specific topic. And, as I pointed out there is no need to fix DBS client or DBS server, since if client will send proper data-types all components, the legacy DBS server, DBS Client API, and other tools (like The bottom line is that clients should send proper data-types to DBS server regardless if client is DBS client API or |
thanks @vkuznet . All fine. |
@belforte , it would be extremely useful if you'll find out how CRAB software stack get values into dict which is passed to DBS client API, e.g. do run, lumi, etc. are integers or strings. I think they are created somewhere in production workflow and I'll be interested to know who create them and which data-type are assigned to them. Then, if CRAB creates a dict it would be nice if it will perform conversion in place, like |
Well... all that goes into DBS comes from WMCore's parsing of cmsRun's FJR where xml is turned into json: OTOH those run/lumi lists are first stored in internal CRAB DB, then read back and sent to DBS. WMCore/src/python/WMCore/REST/Server.py Line 1666 in 42f5675
|
It seems to me that WMCore is doing right thing, thanks to @stefano pointer to FwkJobReport file I see, e.g. https://github.com/dmwm/WMCore/blob/master/src/python/WMCore/FwkJobReport/Report.py#L811, that proper data-type is enforced by this code. @amaltaro could you please provide an example of fwjr JSON file which WMCore use to send data to DBS that I can inspect for data-types correctness. May be everything is in a good shape. |
@vkuznet Valentin, you can find here an old'ish json dump POSTed to the DBSServer in 2019: Code is still the same though, so it should still be a representative example. |
Here is a list of requirements/actions on DBS client side: dmwm/DBS#658 |
I switched requirements on DBS side to this ticket: dmwm/DBSClient#19 |
This ticket is waiting for:
|
Now that all the old agent releases have been stopped, and that the Go-based server (DBSReader) has been in production for 5 days, shall we close this issue out? @vkuznet |
I think we can close this ticket, @amaltaro please do so. |
Impact of the new feature
Align DMWM/WMCore clients with new Go implementation of DBS server
Is your feature request related to a problem? Please describe.
We need to resolve outlined issue in order to perform migration to new DBS server implementation
Describe the solution you'd like
WMCore team should review that their usage of DBS clients is aligned with new behavior of DBS
dbs2go
serverUPDATE (Alan): this issue is meant to be tackled once WMCore applications are ready to work with the Golang implementation of the DBS server.
Describe alternatives you've considered
None
Additional context
To ensure migration from DBS python server to Go implementation there are several issues should be resolved/confirmed by the clients (DMWM tools, CRAB, DAS). Here I provide brief details of each use-case and refer to individual tickets for more details:
to reduce CPU/RAM footprints on a server side the
dbs2go
implementation does not perform aggregation of output results coming out from ORACLE (i.e. it streams from the ORACLE directly). As such few DBS reader APIs output have slightly different data-format (instead of aggregated lists they provide individual records),see WMCore#10841
dbs2go
writer API follow strong data-types checking, while python DBS writer server allows data-types mismatch, e.g. pass '123' and treat it as integer. I found that the following DBS attributes are affected:run_num
,lumi_section_num
,processing_version
,event_count
,file_size
, for details see DBS#657 and associate WMCore#10844 feature requestDBS python server provides inconsistent data-type outputs, e.g. the exception is returned as dict, the results as list, and POST injection as
null
. Indbs2go
implementation all results are returned as list data type, for details see WMCore#10842We should decide on injection POST API output. So far, DBS returns 200 OK HTTP code and
null
string (since its clients parse JSON outputs), but neither is required by HTTP standard. For data injection we should return 201 OK HTTP code, see here, and return nothing (or return empty list of we'd like to have consistent output). Therefore, even though it is not critical, it is desired to adjust to HTTP standard. As such WMCore tools (e.g. pycurl_managert) should be adjusted to handle 201 HTTP code similar to 200 one.For more details on these and other potential issues related to this migration please refer to the following document
The text was updated successfully, but these errors were encountered: