nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Latimer (JIRA)" <>
Subject [jira] [Created] (NIFI-526) GetHTTP may not release writeLock
Date Mon, 20 Apr 2015 15:39:58 GMT
Mark Latimer created NIFI-526:

             Summary: GetHTTP may not release writeLock
                 Key: NIFI-526
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
    Affects Versions: 0.0.2
            Reporter: Mark Latimer
            Priority: Minor

GetHTTP onTrigger process contains a path that will obtain and not release the writeLock.
This happens if enough time elapses between the first and second check of timeToPersist.

Also the readLock locked and unlocked with no meaningful work in between.

		if ((etag != null || lastModified != null) && readLock.tryLock()) {
                    try {
			//first check of timeToPersist against current time
                        if (timeToPersist < System.currentTimeMillis()) {
			    //obtain writeLock
			    //check time to persist again, this result may be different
			    //if the result is different because enough time has elapsed the lock is not released
                            if (timeToPersist < System.currentTimeMillis()) {
                                try {
        		         } finally {
				    //release writeLock only if the second check of timeToPresist is before now.
                    } finally {

This message was sent by Atlassian JIRA

View raw message