正解:D
1
The "Maximum trigger depth exceeded" error occurs when a recursive loop is created, causing triggers to fire repeatedly until the platform's limit of 16 recursive cal2ls is reached. This often happens when an after update trigger performs a DML operation on the same record that initiated the trigger, or when two different objects have triggers that update each other in a circular fashion.
To resolve this, developers use a static Boolean variable within a helper class to manage the execution state.
Because static variables in Apex persist for the duration of a single transaction, the trigger can check the value of this Boolean before executing its logic. When the trigger runs for the first time, it checks if the Boolean is FALSE, sets it to TRUE, and then proceeds. If the trigger is re-invoked within the same transaction (recursion), the Boolean check will fail, and the logic will be skipped. This "recursion guard" ensures the logic only runs once per transaction.
Splitting the logic into two triggers (A) would not help, as both triggers would still be part of the same recursive cycle. There is no isMultiThread annotation (B), and while @future (C) can break the immediate execution chain, it does not address the underlying logic flaw and can lead to unmanageable asynchronous overhead. The static variable approach is the industry-standard "best practice" for recursion control.