Fix Schema cache for manifest-free events using EventName #120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fix is intended to solve issue #109.
Manifest-free events don't have an EventId nor any other value EVENT_DESCRIPTOR that would allow us to properly differentiate from one another. This is explained in the definition of the EVENT_DESCRIPTOR in
evntprov.h
Hence, to differentiate events this fix adds the
event_name
member to theSchemaKey
. This value will only be obtained for events where theEventId == 0
and one of the elements fromExtendedData
of the Record has the typeEVENT_HEADER_EXT_TYPE_EVENT_SCHEMA_TL
. In those cases we will try to parse theDataPtr
to fetch theEventName
.The extended data passed when the type is
EVENT_HEADER_EXT_TYPE_EVENT_SCHEMA_TL
seems to not be documented but looking intoTraceLoggingProvider.h
it seems like it represents the data after the_tlg_EVENT_METADATA_PREAMBLE
in the structure_tlgEventMetadata_t
Since we only care on the
EventName
the parsing routine only consider the first three members (RemainingSize, Tags and EventName).Lastly, this all comes down to
_tlgWriteCommon
, where we can see how the Id and Version are set to 0.TODO