Working with transactions and arbiters

Hello!
Was using transactions with mongocxx driver for some while now.
The interesting thing is that I was using transactions with it and my cluster always had arbiters, this is working fine with the transactions and everything.
Using Mongodb version 6.0.23, mongocxx driver 3.7.

Lately, was trying out some similar code with golang and found out that the transactions are not supported with arbiters, got the following errors from the golang implementation:

(ReadConcernMajorityNotEnabled) Transaction was aborted :: caused by :: from shard shard3 :: caused by :: 'prepareTransaction' is not supported for replica sets with arbiters

This makes sense according to the documentation, but still this is working with no errors in mongocxx code.

Questions are:

  1. how does the transactions work with arbiters when using mongocxx driver? using version 3.7
  2. how do we make them work using the golang driver as well? (can’t cancel the arbiter) using version v1.16.1

Thanks!

update:

  • was able to recreate this error with mongocxx as well.
    • seems that this happens when the transaction is doing updates across multiple shards.
    • apparently this was not happening for me up until now with the cpp usage.
  • so the question is, how can setups using arbiters can overcome this? should they revert to use a simple operation without transaction when this error happens? seems unsafe.
    • not using arbiters does not work with my design which does not have enough resources for a full 3 replica-set.

Thanks!