[
https://issues.apache.org/jira/browse/GEODE-3391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16330664#comment-16330664
]
ASF GitHub Bot commented on GEODE-3391:
---------------------------------------
dgkimura commented on a change in pull request #188: GEODE-3391: Update
Transaction id to pass by references
URL: https://github.com/apache/geode-native/pull/188#discussion_r162383963
##########
File path: cppcache/src/CacheTransactionManagerImpl.cpp
##########
@@ -364,16 +364,16 @@ std::shared_ptr<TransactionId>
CacheTransactionManagerImpl::suspend() {
txState->setSuspendedExpiryTaskId(id);
// add the transaction state to the list of suspended transactions
- addSuspendedTx(txState->getTransactionId()->getId(), txState);
+ addSuspendedTx(txState->getTransactionId().getId(), txState);
// set the current transaction state as null
TSSTXStateWrapper::s_geodeTSSTXState->setTXState(nullptr);
// return the transaction ID
- return txState->getTransactionId();
+ return static_cast<TransactionId&>(txState->getTransactionId());
Review comment:
Type being returned is a `TXId`. Similar to above comment, it may be worth
investigating if abstraction can be removed. Is that something that should be
tackled in a separate GEODE ticket or shall I give it a quick stab as part of
GEODE-3391?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> eval shared_ptr usage in
> CacheListener/CacheLoader/CacheTransactionMgr/CacheWriter
> ----------------------------------------------------------------------------------
>
> Key: GEODE-3391
> URL: https://issues.apache.org/jira/browse/GEODE-3391
> Project: Geode
> Issue Type: Improvement
> Components: native client
> Reporter: Ernest Burghardt
> Priority: Major
> Labels: pull-request-available
>
> evaluate shared_ptr usage and change to reference
> virtual void afterRegionDisconnected(Region& region)
> virtual CacheablePtr load(Region& rp, const CacheableKeyPtr& key,
> const UserDataPtr& aCallbackArgument) = 0;
> virtual void close(Region& rp);
> virtual void resume(const TransactionId& transactionId)
> virtual const TransactionId& getTransactionId() = 0;
> virtual void close(Region& rp);
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)