I've had a Query Store issue that i've not come across before with regard to the last_force_failure reason continuing to be reported long after the original issue has disappeared.
So I have a forced plan which for one short interval was bypassed and a worse plan was chosen but then the query went back to using it's original plan.
It displayed the reason for failure as 'GENERAL_FAILURE'. Even though the query was now running on its original forced plan again it repeatedly reported (we have alerting set up for any plan forcing failures) that previously there had been a failure. I originally removed the plan from query store via sp_query_store_remove_plan and unforced/reforced the plan. The Stored Proc didn't run for a while, but the next time it did the error was back however in each run interval the stored proc had successfully used the forced plan i.e. it was still reporting the 'reason it last failed' rather than 'it's failed again this is the reason'.
I then took this a step further which i was sure would fix it. As well as unforcing the plan, i removed the actual query from query store using sp_query_store_remove_query. I waited until the next time the Stored Proc ran via the application and then forced again and could see it was using a totally different query_id and plan_id. I thought this was all resolved, but the last_failure_reason was populated again as soon as the stored proc ran again with the forced plan (and again i can see it was choosing the forced plan each time, no reoccurrence of it using a non-forced plan).
So for now i've left the plan unforced as it's actually choosing an optimal plan each time but i'm keen to get to the bottom of why this last_failure_reason keeps repopulating.
Any pointers appreciated.