CPC G06F 9/466 (2013.01) [H04L 67/02 (2013.01)] | 20 Claims |
1. A computer-implemented method comprising:
obtaining a request to execute user-submitted code on an on-demand code execution system, wherein the user-submitted code is associated with metadata that identifies a portion of the user-submitted code as including a transaction;
causing the on-demand code execution system to configure a virtual computing environment to execute the user-submitted code;
generating a snapshot of the virtual computing environment when execution of the user-submitted code reaches a first statement in the user-submitted code, the first statement associated with a start of the transaction;
causing the on-demand code execution system to perform a first execution of the transaction within the virtual computing environment;
determining, based at least in part on a result obtained from the first execution, that the first execution was not successful, wherein the result is generated based at least in part on the execution of the user-submitted code reaching a second statement associated with an end of the transaction;
causing the on-demand code execution system to restore the snapshot of the virtual computing environment, wherein restoring the snapshot of the virtual computing environment changes an execution state of the user-submitted code from a state corresponding to the second statement to a state corresponding to the first statement; and
causing the on-demand code execution system to perform a second execution of the transaction within the virtual computing environment.
|