Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
TimeoutEntity_EndpointIdx validation error due to braces "[" and "]" used in schema name, even though correct index defined. #349
Hi, had a chat with Andreas today about "TimeoutEntity_EndpointIdx" index column validation error on the TimeoutEntity table. Because my schema contains braces when provided to the NHibernate config because otherwise it would not be recognized as a good identifier due to the use of a hyphen, the query to determine the columns used in the index does not return any results.
As a result the following log entries are created:
2018-11-07 14:58:38,212  DEBUG NServiceBus.TimeoutPersisters.NHibernate.Installer.IncorrectIndexDetector - Detected TimeoutEntity_EndpointIdx (, )
2018-11-07 14:58:38,213  WARN NServiceBus.TimeoutPersisters.NHibernate.Installer.IncorrectIndexDetector - The TimeoutEntity_EndpointIdx index has incorrect column order. This may cause significant performance degradation of message deferral. Consult NServiceBus NHibernate persistence documentation for details on how to create this index.
Possibly this issue can be fixed here within the GetIndex method:
By changing the GetIndex code as follows (only showing a snippet of the entire body):
This fix targets the use of braces with the schema specifically, perhaps the other properties should also be checked in a similar way?
@roel-charita can I clarify what the impact of this is? Is the result just a misleading/wrong warning message, or does this also affect runtime behavior?
I assume the scope is limited to only when using bracket-delimited schema names.
Also, what version of NServiceBus.NHibernate are you currently using?