Skip to content
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

Duplicate warning from GdidAuthorityService - maybe due to double configuration call #896

Open
itadapter opened this issue Sep 9, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@itadapter
Copy link
Contributor

itadapter commented Sep 9, 2023

We get duplicate warnings in logs.
It looks like the warning comes from SETter of AuthorityIDs, which is called twice, because
GdidAuthorityServiceBase.DoConfigure calls base.DoConfigure() then ConfigAttribte.Apply() yeat again.
The second attribute apply is not needed as the base config call does this already.

{
  "Gdid": "0:1:329233",
  "Guid": "6a0c98c3-b6c2-484c-a96f-bd3cc4c81ffd",
  "App": "esgov",
  "Type": "Warning",
  "Source": 96,
  "UTCTimeStamp": "2023-09-08T20:34:39.775Z",
  "Host": "dsys-app-01",
  "From": "GdidAuthorityService@82.AuthorityIDs.set()",
  "Topic": "idg",
  "Text": "AUTHORITY = 0102. This is a warning because an extra care should be taken with AUTHORITY assignment",
  "SrcDataShard": 0
}

See this C#

protected override void DoConfigure(IConfigSectionNode node)
      {
        if (node==null)
          node = App.ConfigRoot[CONFIG_GDID_AUTHORITY_SECTION];

        base.DoConfigure(node);
        ConfigAttribute.Apply( this, node );//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< DUPLICATION

        foreach(var lnode in node[CONFIG_PERSISTENCE_SECTION].Children.Where(n=>n.IsSameName(CONFIG_LOCATION_SECTION)))
        {
          var location = FactoryUtils.Make<PersistenceLocation>(lnode, typeof(DiskPersistenceLocation), new object[] {lnode});
          m_Locations.Register(location);
        }
      }
@itadapter itadapter self-assigned this Sep 9, 2023
@itadapter itadapter added the bug Something isn't working label Sep 9, 2023
@itadapter itadapter changed the title Duplicate warning from GdidAuthorityService - maybe due to double configuration Duplicate warning from GdidAuthorityService - maybe due to double configuration call Sep 9, 2023
@g8sun
Copy link

g8sun commented Sep 9, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants