You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2017/03/23 14:14:42 UTC

[jira] [Updated] (KYLIN-2509) Unsafe iteration over booking in MemoryBudgetController#tryFreeUp

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

Ted Yu updated KYLIN-2509:
--------------------------
    Description: 
{code}
        for (ConsumerEntry entry : booking.values()) {
            int mb = entry.consumer.freeUp(gap);
            if (mb > 0) {
                lock.lock();
                try {
                    updateBookingWithDelta(entry.consumer, -mb);
{code}

In updateBookingWithDelta, booking may be modified, leading to concurrent modification.

  was:
{code}
        for (ConsumerEntry entry : booking.values()) {
            int mb = entry.consumer.freeUp(gap);
            if (mb > 0) {
                lock.lock();
                try {
                    updateBookingWithDelta(entry.consumer, -mb);
{code}
In updateBookingWithDelta, booking may be modified, leading to concurrent modification.


> Unsafe iteration over booking in MemoryBudgetController#tryFreeUp
> -----------------------------------------------------------------
>
>                 Key: KYLIN-2509
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2509
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>         for (ConsumerEntry entry : booking.values()) {
>             int mb = entry.consumer.freeUp(gap);
>             if (mb > 0) {
>                 lock.lock();
>                 try {
>                     updateBookingWithDelta(entry.consumer, -mb);
> {code}
> In updateBookingWithDelta, booking may be modified, leading to concurrent modification.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)