[
https://issues.apache.org/jira/browse/IGNITE-14165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17285844#comment-17285844
]
Ilya Kasnacheev commented on IGNITE-14165:
------------------------------------------
The test is very simple:
{code}
struct Blob
{
int8_t m_blob[512];
};
IgniteClient client = IgniteClient::Start(cfg);
CacheClient<int32_t, Blob> cache = client.GetOrCreateCache<int32_t,
examples::Blob>("vds");
cache.Clear();
std::map<int32_t, Blob> map;
for (uint32_t i = 0; i < 2000000; ++i)
map.insert (std::make_pair(i, Blob()));
ClientTransactions transactions = client.ClientTransactions();
ClientTransaction tx = transactions.TxStart(PESSIMISTIC,
READ_COMMITTED);
cache.PutAll(map);
tx.Commit();
{code}
As you can see, the total size of the transaction (not taking keys into
account) is 2M * 512B = 1GB. If we limit the loop up to 1.9M, it works...
and I've found where the problem is:
<http://apache-ignite-users.70518.x6.nabble.com/file/t3059/bug.png>
As you can see, as "doubleCap" is an int, trying to double it when "cap" is
big enough makes it negative, therefore, it's not finally doubled... which
leads to a reallocation of 1GB each time a new key-value entry is added to
the tcp message.
Using integers to store capacity in your C++ Thin Client is implicitly
limiting your maximum transaction size up to 1GB. Maybe you should consider
to use uint64_t instead...
> C++ Thin Client bug with transactions larger than 1GB
> -----------------------------------------------------
>
> Key: IGNITE-14165
> URL: https://issues.apache.org/jira/browse/IGNITE-14165
> Project: Ignite
> Issue Type: Bug
> Components: thin client
> Affects Versions: 2.9.1
> Reporter: José Mª Jimeno
> Priority: Major
>
> http://apache-ignite-users.70518.x6.nabble.com/Long-transaction-suspended-tp35368p35419.html
--
This message was sent by Atlassian Jira
(v8.3.4#803005)