[jboss-jira] [JBoss JIRA] (WFCORE-829) Content repo gc task can delete content in mid-upload
Brian Stansberry (JIRA)
issues at jboss.org
Tue Aug 11 12:22:03 EDT 2015
[ https://issues.jboss.org/browse/WFCORE-829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13097355#comment-13097355 ]
Brian Stansberry commented on WFCORE-829:
-----------------------------------------
I'm not overly concerned about the locking, as the upload is really an inherent part of whatever other op is going to use the uploaded content (e.g. the deployment add op.) I believe if the CLI were used for this instead of a pure HTTP client, the upload would happen as part of the execution of the deployment add itself. (IIRC the CLI attaches the content as a stream.)
That said, the temp file idea is interesting. It could perhaps be used with the deployment add handlers itself too, i.e. to get the over-the-network part of the upload out of the lock.
HOWEVER, while looking at this further since writing the above I'm confused about the initial report. Looking at DomainApiUploadHandler (which deals with the HTTP part of this) in both EAP 6 and WildFly it looks like the effect is to store the uploaded content to a temp file and then invoke the management op with the temp file attached as a stream. So the basic effect should already be what you suggest. So what is taking 5 mins without the lock held? Just the local FS copy from that temp file to the repo?
The .lock file idea is less tempting. Mostly because it adds complexity. If the system crashes in the middle of upload, the .lock file will be left around. Using a file in the jboss.server.tmp.dir is less of an issue as that dir gets wiped on reboot.
> Content repo gc task can delete content in mid-upload
> -----------------------------------------------------
>
> Key: WFCORE-829
> URL: https://issues.jboss.org/browse/WFCORE-829
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 2.0.0.Alpha10
> Reporter: Brian Stansberry
> Assignee: ehsavoie Hugonnet
>
> Description of problem:
> if upload of an application takes more than 5 minutes, it is removed from repository by clean-obsolete-content.
> - start the upload
> [Host Controller] 15:44:05,456 INFO [org.jboss.as.repository] (HttpManagementService-threads - 1) JBAS014900: Content added at location /opt/jboss-eap-6.4/domain-dc/data/content/90/828120fc51e4b5f5ededbb5981198b4be93e64/content
> - After 5 minutes, the content is removed:
> [Host Controller] 15:49:32,111 INFO [org.jboss.as.repository] (Host Controller Service Threads - 33) JBAS014903: Content /opt/jboss-eap-6.4/domain-dc/data/content/90/828120fc51e4b5f5ededbb5981198b4be93e64 is obsolete and will be removed
> [Host Controller] 15:49:32,113 INFO [org.jboss.as.repository] (Host Controller Service Threads - 33) JBAS014901: Content removed from location /opt/jboss-eap-6.4/domain-dc/data/content/90/828120fc51e4b5f5ededbb5981198b4be93e64/content
> The reference for the deployment is added to domain.xml only after the upload is finished.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list