[ 
https://issues.apache.org/jira/browse/SANDESHA2C-30?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Damitha Kumarage closed SANDESHA2C-30.
--------------------------------------


> Bottleneck due to sequential transactions
> -----------------------------------------
>
>                 Key: SANDESHA2C-30
>                 URL: https://issues.apache.org/jira/browse/SANDESHA2C-30
>             Project: Sandesha2/C
>          Issue Type: Bug
>            Reporter: Damitha Kumarage
>
> When a new transaction is requested from sandesha2_storage_mgr it waits for 1 
> for each transaction which is currently active.
> Here is culprit code
>     for (index = axis2_hash_first(storage_mgr_impl->transactions , env); 
> index;
>         index = axis2_hash_next(env, index))
>     {
>         void *v = NULL;
>         sandesha2_transaction_t *temp = NULL;
>         axis2_hash_this(index, NULL, NULL, &v);
>         temp = (sandesha2_transaction_t *) v;
>         while(sandesha2_permanent_transaction_is_active(temp, env))
>         {
>             AXIS2_SLEEP(1);
>         }
>     }
> I changed this code to following
>     thread_id_key = AXIS2_MALLOC(env->allocator, sizeof(char)*128);
>     sprintf(thread_id_key, "%lu", thread_id);
>     transaction = (sandesha2_transaction_t *) axis2_hash_get(
>         storage_mgr_impl->transactions, thread_id_key, AXIS2_HASH_KEY_STRING);
>     while(transaction && 
> sandesha2_permanent_transaction_is_active(transaction, env))
>     {
>         AXIS2_SLEEP(1);
>     }
> in this case it waits only if the transaction is for the same thread id which 
> is acceptable

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to