Skip to content

Conversation

@rtamalin
Copy link
Collaborator

Define two new tables:

  • profiles This table stores the complete profiles that have been provided by clients as part of the system registration (announce_system) or keepalive (update) request handling, which consists of three fields, product_type, identifier and data.
  • system_profiles This table is used to link systems records to their associated profiles in a one to many relationship, allowing for the same profile records to be shared between multiple systems

Add support for handling any provided profiles to the handlers for the announce_system and update requests in the connect V3 API.

This support involves checking that the provided profiles are valid and, when provided for the first time, complete, with new profiles being added to the profiles table, and appropriate references being added or updated via the system_profiles table to associate systems with their corresponding profiles.

Similarly, when incomplete profiles are included in update requests, the corresponding complete profiles will be retrieved and used, with any missing profiles being dropped and considered problematic.

Additionally, when problematic profiles are detected, whether invalid or incomplete, they will be ignored and the X-System-Profiles-Action header will be included in the response, with a value of clear-cache.

In the System model a new custom attribute, complete_profiles, with an accompanying assignment method, complete_profiles=, is used to handle the assignment of complete profiles to be associated with a system record as part of record creation or update.

If racing requests attempt to create the same new profile, one will succeed and the others will rescue the ActiveRecord:RecordNotUnique exception and instead lookup the newly created profile record.

Update the test cases to validate correct operation of new models, and associated request handling changes.

Related Jira: TEL-265

Define two new tables:
  * profiles
    This table stores the complete profiles that have been provided
    by clients as part of the system registration (announce_system)
    or keepalive (update) request handling, which consists of three
    fields, product_type, identifier and data.
  * system_profiles
    This table is used to link systems records to their associated
    profiles in a one to many relationship, allowing for the same
    profile records to be shared between multiple systems

Add support for handling any provided profiles to the handlers for
the announce_system and update requests in the connect V3 API.

This support involves checking that the provided profiles are valid
and, when provided for the first time, complete, with new profiles
being added to the profiles table, and appropriate references being
added or updated via the system_profiles table to associate systems
with their corresponding profiles.

Similarly, when incomplete profiles are included in update requests,
the corresponding complete profiles will be retrieved and used, with
any missing profiles being dropped and considered problematic.

Additionally, when problematic profiles are detected, whether invalid
or incomplete, they will be ignored and the X-System-Profiles-Action
header will be included in the response, with a value of clear-cache.

In the System model a new custom attribute, complete_profiles, with
an accompanying assignment method, complete_profiles=, is used to
handle the assignment of complete profiles to be associated with a
system record as part of record creation or update.

If racing requests attempt to create the same new profile, one will
succeed and the others will rescue the ActiveRecord:RecordNotUnique
exception and instead lookup the newly created profile record.

Update the test cases to validate correct operation of new models,
and associated request handling changes.
@rtamalin
Copy link
Collaborator Author

FYI while doing some heavy stress testing I'm seeing some DB stall issues

@rtamalin
Copy link
Collaborator Author

Investigating and the issue may be related to recent changes on the master branch

@rtamalin
Copy link
Collaborator Author

rtamalin commented Nov 12, 2025

Yup having reverted my test env to be based upon current master branch I still see the same issue... Digging further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants