System and method for efficient snapshots barrier mechanism for system with presorted container-based log
A method, computer program product, and computer system for permitting, by a computing device, entering of a barrier object of a plurality of barrier objects with a first set of one or more Application Programming Interfaces (APIs) only when the barrier object is not set. The first set of the one or more APIs on the barrier object may wait until the barrier object is reset. A second set of the one or more APIs may set the barrier object. Waiting may occur until there are no longer any flows in the barrier object.
1. A computer-implemented method comprising:
permitting, by a computing device, entering of a barrier object of a plurality of barrier objects with a first set of one or more Application Programming Interfaces (APIs) only when the barrier object is not set, wherein each barrier object is an array of spinlocks, wherein entering of the barrier object acquires a spinlock of the array of spinlocks related to the specific core of the number of cores;
waiting by the first set of the one or more APIs on the barrier object until the barrier object is reset;
setting, by a second set of the one or more APIs, the barrier object; and
waiting until there are no longer any flows in the barrier object,
wherein a waiting queue per a specific core of a number of cores is added to the barrier object to avoid spinning at a time of the barrier object is set completely, and
wherein exiting the barrier object releases the spinlock of the array of spinlocks related to the specific core of the number of cores.
2. The computer-implemented method of claim 1 wherein a size of the array of spinlocks is related to the number of cores.
3. The computer-implemented method of claim 1 wherein setting the barrier object acquires each of the array of spinlocks one by one in a loop.
4. A computer program product residing on a non-transitory computer readable storage medium having a plurality of instructions stored thereon which, when executed across one or more processors, causes at least a portion of the one or more processors to perform operations comprising:
permitting entering of a barrier object of a plurality of barrier objects with a first set of one or more Application Programming Interfaces (APIs) only when the barrier object is not set, wherein each barrier object is an array of spinlocks, wherein entering of the barrier object acquires a spinlock of the array of spinlocks related to the specific core of the number of cores;
waiting by the first set of the one or more APIs on the barrier object until the barrier object is reset;
setting, by a second set of the one or more APIs, the barrier object; and
waiting until there are no longer any flows in the barrier object,
wherein a waiting queue per a specific core of a number of cores is added to the barrier object to avoid spinning at a time of the barrier object is set completely, and
wherein exiting the barrier object releases the spinlock of the array of spinlocks related to the specific core of the number of cores.
5. The computer program product of claim 4 wherein a size of the array of spinlocks is related to the number of cores.
6. The computer program product of claim 4 wherein setting the barrier object acquires each of the array of spinlocks one by one in a loop.
7. A computing system including one or more processors and one or more memories configured to perform operations comprising:
permitting entering of a barrier object of a plurality of barrier objects with a first set of one or more Application Programming Interfaces (APIs) only when the barrier object is not set, wherein each barrier object is an array of spinlocks, wherein entering of the barrier object acquires a spinlock of the array of spinlocks related to the specific core of the number of cores;
waiting by the first set of the one or more APIs on the barrier object until the barrier object is reset;
setting, by a second set of the one or more APIs, the barrier object; and
waiting until there are no longer any flows in the barrier object,
wherein a waiting queue per a specific core of a number of cores is added to the barrier object to avoid spinning at a time of the barrier object is set completely, and
wherein exiting the barrier object releases the spinlock of the array of spinlocks related to the specific core of the number of cores.
8. The computing system of claim 7 wherein a size of the array of spinlocks is related to the number of cores.
9. The computing system of claim 7 wherein setting the barrier object acquires each of the array of spinlocks one by one in a loop.