MCPcopy Create free account
hub / github.com/activeloopai/deeplake / deeplake_xact_callback

Function deeplake_xact_callback

cpp/deeplake_pg/pg_deeplake.cpp:338–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336/// @}
337
338void deeplake_xact_callback(XactEvent event, void *arg)
339{
340 switch (event) {
341 case XACT_EVENT_PRE_COMMIT:
342 case XACT_EVENT_PARALLEL_PRE_COMMIT:
343 pg::table_storage::instance().commit_all();
344 break;
345 case XACT_EVENT_ABORT:
346 case XACT_EVENT_PARALLEL_ABORT:
347 // Handle transaction abort by rolling back changes
348 // Don't throw ERROR here as it would trigger cascading abort loop
349 pg::table_storage::instance().rollback_all();
350 break;
351 default:
352 break;
353 }
354}
355
356void init_deeplake()
357{

Callers

nothing calls this directly

Calls 2

commit_allMethod · 0.80
rollback_allMethod · 0.80

Tested by

no test coverage detected