fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
3.02k stars 419 forks source link

increased DB locking issues when listing MDM profiles #14694

Closed roperzh closed 9 months ago

roperzh commented 11 months ago

Fleet version: 4.38.1


💥  Actual behavior

When we list for profiles, we make a call to verify if the team exists:

https://github.com/fleetdm/fleet/blob/e6d4ed5f7af51b4f2d4c95ff6f4f742287021e77/server/service/apple_mdm.go#L395-L400

Getting the team information is the source of some timeouts, for example:

list config profiles: : get team config features: context canceled

🧑‍💻  Steps to reproduce

This is a code bug that causes performance issues but can't be easily replicated.

Verification after the fix should ensure that listing profiles still works as expected:

  1. Add profiles for team/no team
  2. Use the mdm/apple/profiles?team_id=.. endpoint and check the right values are returned
  3. Use the mdm/apple/profiles?team_id=.. endpoint with a non-existent team id an verify that we return a good error + status code
roperzh commented 10 months ago

@georgekarrv should we close this? we haven't seen problems even after the extra waiting time.

georgekarrv commented 10 months ago

Yes it was just on this sprint to make sure and check once more before closing

roperzh commented 9 months ago

@georgekarrv should we close this?

roperzh commented 9 months ago

tentatively moving to "ready for release" so it doesn't get picked up

fleet-release commented 9 months ago

Database locks no more, Profiles listed with ease. Fleet soars, users pleased.