@@ -459,29 +459,29 @@ typedef enum wsrep_key_type
459
459
} wsrep_key_type_t ;
460
460
461
461
/*! Transaction handle struct passed for wsrep transaction handling calls */
462
- typedef struct wsrep_trx_handle_
462
+ typedef struct wsrep_ws_handle_
463
463
{
464
464
wsrep_trx_id_t trx_id ; //!< transaction ID
465
465
void * opaque ; //!< opaque provider transaction context data
466
- } wsrep_trx_handle_t ;
466
+ } wsrep_ws_handle_t ;
467
467
468
468
/*!
469
- * @brief Helper method to reset trx handle state when trx id changes
469
+ * @brief Helper method to reset trx writeset handle state when trx id changes
470
470
*
471
- * Instead of passing wsrep_trx_handle_t directly to wsrep calls,
471
+ * Instead of passing wsrep_ws_handle_t directly to wsrep calls,
472
472
* wrapping handle with this call offloads bookkeeping from
473
473
* application.
474
474
*/
475
- static inline wsrep_trx_handle_t * wsrep_trx_handle_for_id (
476
- wsrep_trx_handle_t * trx_handle ,
477
- wsrep_trx_id_t trx_id )
475
+ static inline wsrep_ws_handle_t * wsrep_ws_handle_for_trx (
476
+ wsrep_ws_handle_t * ws_handle ,
477
+ wsrep_trx_id_t trx_id )
478
478
{
479
- if (trx_handle -> trx_id != trx_id )
479
+ if (ws_handle -> trx_id != trx_id )
480
480
{
481
- trx_handle -> trx_id = trx_id ;
482
- trx_handle -> opaque = NULL ;
481
+ ws_handle -> trx_id = trx_id ;
482
+ ws_handle -> opaque = NULL ;
483
483
}
484
- return trx_handle ;
484
+ return ws_handle ;
485
485
}
486
486
487
487
typedef struct wsrep_ wsrep_t ;
@@ -580,7 +580,7 @@ struct wsrep_ {
580
580
* commit. Otherwise transaction must rollback.
581
581
*
582
582
* @param wsrep provider handle
583
- * @param trx_handle transaction which is committing
583
+ * @param ws_handle writeset of committing transaction
584
584
* @param conn_id connection ID
585
585
// * @param data array of application data buffers
586
586
// * @param count buffer count
@@ -594,7 +594,7 @@ struct wsrep_ {
594
594
*/
595
595
wsrep_status_t (* pre_commit )(wsrep_t * wsrep ,
596
596
wsrep_conn_id_t conn_id ,
597
- wsrep_trx_handle_t * trx_handle ,
597
+ wsrep_ws_handle_t * ws_handle ,
598
598
// const struct wsrep_buf* data,
599
599
// long count,
600
600
uint64_t flags ,
@@ -606,21 +606,21 @@ struct wsrep_ {
606
606
* Ends commit critical section.
607
607
*
608
608
* @param wsrep provider handle
609
- * @param trx_handle transaction which is committing
609
+ * @param ws_handle writeset of committing transaction
610
610
* @retval WSREP_OK post_commit succeeded
611
611
*/
612
612
wsrep_status_t (* post_commit ) (wsrep_t * wsrep ,
613
- wsrep_trx_handle_t * trx_handle );
613
+ wsrep_ws_handle_t * ws_handle );
614
614
615
615
/*!
616
616
* @brief Releases resources after transaction rollback.
617
617
*
618
618
* @param wsrep provider handle
619
- * @param trx_handle transaction which is committing
619
+ * @param ws_handle writeset of committing transaction
620
620
* @retval WSREP_OK post_rollback succeeded
621
621
*/
622
622
wsrep_status_t (* post_rollback )(wsrep_t * wsrep ,
623
- wsrep_trx_handle_t * trx_handle );
623
+ wsrep_ws_handle_t * ws_handle );
624
624
625
625
/*!
626
626
* @brief Replay trx as a slave write set
@@ -631,7 +631,7 @@ struct wsrep_ {
631
631
* test based on write set content can be different to DBMS lock conflicts.
632
632
*
633
633
* @param wsrep provider handle
634
- * @param trx_handle transaction which is committing
634
+ * @param ws_handle writeset of committing transaction
635
635
* @param trx_ctx transaction context
636
636
*
637
637
* @retval WSREP_OK cluster commit succeeded
@@ -642,7 +642,7 @@ struct wsrep_ {
642
642
* @retval WSREP_NODE_FAIL must close all connections and reinit
643
643
*/
644
644
wsrep_status_t (* replay_trx )(wsrep_t * wsrep ,
645
- wsrep_trx_handle_t * trx_handle ,
645
+ wsrep_ws_handle_t * ws_handle ,
646
646
void * trx_ctx );
647
647
648
648
/*!
@@ -672,14 +672,14 @@ struct wsrep_ {
672
672
* interpreted as WSREP_KEY_EXCLUSIVE).
673
673
*
674
674
* @param wsrep provider handle
675
- * @param trx_handle transaction handle
675
+ * @param ws_handle writeset handle
676
676
* @param keys array of keys
677
677
* @param keys_num length of the array of keys
678
678
* @param copy can be set to FALSE if keys persist until commit.
679
679
* @param shared boolean denoting if key corresponds to shared resource
680
680
*/
681
681
wsrep_status_t (* append_key )(wsrep_t * wsrep ,
682
- wsrep_trx_handle_t * trx_handle ,
682
+ wsrep_ws_handle_t * ws_handle ,
683
683
const wsrep_key_t * keys ,
684
684
long keys_num ,
685
685
wsrep_key_type_t key_type ,
@@ -689,20 +689,20 @@ struct wsrep_ {
689
689
* @brief Appends data to transaction write set
690
690
*
691
691
* This method can be called any time before commit and it
692
- * appends data block into transaction's write set.
692
+ * appends a number of data buffers to transaction write set.
693
693
*
694
694
* Both copy and unordered flags can be ignored by provider.
695
695
*
696
696
* @param wsrep provider handle
697
- * @param trx_handle transaction handle
697
+ * @param ws_handle writeset handle
698
698
* @param data array of data buffers
699
699
* @param count buffer count
700
700
* @param copy can be set to FALSE if data persists until commit.
701
701
* @param unordered can be set to TRUE if this part of the write set
702
702
* executed out of order.
703
703
*/
704
704
wsrep_status_t (* append_data )(wsrep_t * wsrep ,
705
- wsrep_trx_handle_t * trx_handle ,
705
+ wsrep_ws_handle_t * ws_handle ,
706
706
const struct wsrep_buf * data ,
707
707
long count ,
708
708
wsrep_bool_t copy ,
@@ -717,13 +717,13 @@ struct wsrep_ {
717
717
* Copy flag can be ignored by provider.
718
718
*
719
719
* @param wsrep provider handle
720
- * @param trx_handle transaction handle
720
+ * @param ws_handle writeset handle
721
721
* @param annotation array of annotation strings
722
722
* @param count annotation string count
723
723
* @param copy can be set to FALSE if data persists until commit.
724
724
*/
725
725
wsrep_status_t (* annotate )(wsrep_t * wsrep ,
726
- wsrep_trx_handle_t * trx_handle ,
726
+ wsrep_ws_handle_t * ws_handle ,
727
727
const char * annotation [],
728
728
long count ,
729
729
wsrep_bool_t copy );
0 commit comments