Methods and systems for debugging bytecode in an on-demand service environment
First Claim
1. A method for simulating execution debug in a system of a multi-tenant database environment, the system having at least a processor and a memory therein, wherein the method comprises:
- executing code within the multi-tenant database environment on behalf of a plurality of separate and distinct customer organizations, each customer organization being uniquely identified by an organization identifier (OrgID), the multi-tenant database environment having elements of hardware and software that are shared by the plurality of separate and distinct customer organizations;
wherein stopping the execution of the code for execution debug within the multi-tenant environment is not permitted due to such stopping of the code execution causing a code execution stop for all of the customer organizations presently executing other code on the shared hardware and software resource elements provided by the multi-tenant environment;
forcing emission of execution data from the execution of the code within the multi-tenant database environment on behalf of the plurality of separate and distinct customer organizations by encoding one or more trace flags into the code prior to executing the code and by routing any operation or executable line of code processed against the multi-tenant database implementation on behalf of any one of the plurality of separate and distinct customer organizations through an encapsulated library of services to trigger the emission of the execution data when one or more trace preferences are active for a request to execute the code, the one or more trace preferences based on a client organization identifier (OrgID) associated with the request;
capturing the execution data emitted from the execution of the code within the multi-tenant database environment, wherein the execution data emitted by the encapsulated library of services provides a transcript of all execution events that occur within the multi-tenant database implementation on behalf of any one of the plurality of separate and distinct customer organizations;
persistently storing the captured execution data emitted from the execution of the code as the transcript of execution events; and
replaying execution events associated with the OrgID associated with the request to simulate an original execution performed via the execution of the code within the multi-tenant environment by referencing the persistently stored execution data of the transcript of execution events without requiring any portion of the original execution be re-executed or reprocessed, wherein an execution debug simulator replays the execution events from the transcript captured based on the one or more trace debug preferences triggered to be active pursuant to the request as originally received.
0 Assignments
0 Petitions
Accused Products
Abstract
Described herein are means for debugging byte code in an on-demand service environment system including a system for simulating execution debug in a multi-tenant database environment. Such means may include: receiving a request at a web-server of the system, determining one or more trace preferences are active for the request, sending the request to a logging framework communicatively interfaced to the multi-tenant database implementation, processing the request via the logging framework, and capturing at least a portion of the execution data emitted responsive to execution of the plurality of events for use in simulating execution debug of the events. Other related embodiments are additionally described.
130 Citations
18 Claims
-
1. A method for simulating execution debug in a system of a multi-tenant database environment, the system having at least a processor and a memory therein, wherein the method comprises:
-
executing code within the multi-tenant database environment on behalf of a plurality of separate and distinct customer organizations, each customer organization being uniquely identified by an organization identifier (OrgID), the multi-tenant database environment having elements of hardware and software that are shared by the plurality of separate and distinct customer organizations; wherein stopping the execution of the code for execution debug within the multi-tenant environment is not permitted due to such stopping of the code execution causing a code execution stop for all of the customer organizations presently executing other code on the shared hardware and software resource elements provided by the multi-tenant environment; forcing emission of execution data from the execution of the code within the multi-tenant database environment on behalf of the plurality of separate and distinct customer organizations by encoding one or more trace flags into the code prior to executing the code and by routing any operation or executable line of code processed against the multi-tenant database implementation on behalf of any one of the plurality of separate and distinct customer organizations through an encapsulated library of services to trigger the emission of the execution data when one or more trace preferences are active for a request to execute the code, the one or more trace preferences based on a client organization identifier (OrgID) associated with the request; capturing the execution data emitted from the execution of the code within the multi-tenant database environment, wherein the execution data emitted by the encapsulated library of services provides a transcript of all execution events that occur within the multi-tenant database implementation on behalf of any one of the plurality of separate and distinct customer organizations; persistently storing the captured execution data emitted from the execution of the code as the transcript of execution events; and replaying execution events associated with the OrgID associated with the request to simulate an original execution performed via the execution of the code within the multi-tenant environment by referencing the persistently stored execution data of the transcript of execution events without requiring any portion of the original execution be re-executed or reprocessed, wherein an execution debug simulator replays the execution events from the transcript captured based on the one or more trace debug preferences triggered to be active pursuant to the request as originally received. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. Non-transitory computer readable storage media having instructions store thereupon that, when executed by a processor of a system in a multi-tenant database environment, the instructions cause the system to perform operations comprising:
-
executing code within the multi-tenant database environment on behalf of a plurality of separate and distinct customer organizations, each customer organization being uniquely identified by an organization identifier (OrgID), the multi-tenant database environment having elements of hardware and software that are shared by the plurality of separate and distinct customer organizations; wherein stopping the execution of the code for execution debug within the multi-tenant environment is not permitted due to such stopping of the code execution causing a code execution stop for all of the customer organizations presently executing other code on the shared hardware and software resource elements provided by the multi-tenant environment; forcing emission of execution data from the execution of the code within the multi-tenant database environment on behalf of the plurality of separate and distinct customer organizations by encoding one or more trace flags into the code prior to executing the code and by routing any operation or executable line of code processed against the multi-tenant database implementation on behalf of any one of the plurality of separate and distinct customer organizations through an encapsulated library of services to trigger the emission of the execution data when one or more trace preferences are active for a request to execute the code, the one or more trace preferences based on a client organization identifier (OrgID) associated with the request; capturing the execution data emitted from the execution of the code within the multi-tenant database environment, wherein the execution data emitted by the encapsulated library of services provides a transcript of all execution events that occur within the multi-tenant database implementation on behalf of any one of the plurality of separate and distinct customer organizations; persistently storing the captured execution data emitted from the execution of the code as the transcript of execution events; and replaying execution events associated with the OrgID associated with the request to simulate an original execution performed via the execution of the code within the multi-tenant environment by referencing the persistently stored execution data of the transcript of execution events without requiring any portion of the original execution be re-executed or reprocessed, wherein an execution debug simulator replays the execution events from the transcript captured based on the one or more trace debug preferences triggered to be active pursuant to the request as originally received. - View Dependent Claims (14, 15)
-
-
16. A system for simulating execution debug in a multi-tenant database environment, the system comprising:
-
a multi-tenant database environment to execute code on behalf of a plurality of separate and distinct customer organizations, each customer organization being uniquely identified by an organization identifier (OrgID), the multi-tenant database environment having elements of hardware and software that are shared by the plurality of separate and distinct customer organizations; wherein stopping the execution of the code for execution debug within the multi-tenant environment is not permitted due to such stopping of the execution of the code causing a code execution stop for all of the customer organizations presently executing other code on the shared hardware and software resource elements provided by the multi-tenant environment; the multi-tenant database environment to force emission of execution data from the execution of the code within the multi-tenant database environment on behalf of the plurality of separate and distinct customer organizations by encoding one or more trace flags into the code prior to executing the code and by routing any operation or executable line of code processed against the multi-tenant database implementation on behalf of any one of the plurality of separate and distinct customer organizations through an encapsulated library of services to trigger the emission of the execution data when one or more trace preferences are active for a request to execute the code, the one or more trace preferences based on a client organization identifier (OrgID) associated with the request; memory to capture the execution data emitted from the execution of the code within the multi-tenant database environment, wherein the execution data emitted by the encapsulated library of services provides a transcript of all execution events that occur within the multi-tenant database implementation on behalf of any one of the plurality of separate and distinct customer organizations; storage media to persistently store the captured execution data emitted from the execution of the code as the transcript of execution events; and a debug simulator to replay the transcript of execution events associated with the OrgID associated with the request to simulate an original execution performed via the execution of the code within the multi-tenant environment by referencing the persistently stored execution data of the transcript of execution events without requiring any portion of the original execution be re-executed or reprocessed, wherein an execution debug simulator replays the execution events from the transcript captured based on the one or more trace debug preferences triggered to be active pursuant to the request as originally received. - View Dependent Claims (17, 18)
-
Specification