True, but you should check that the size is not already set. If it is set then you shouldn't update the DB
From: Sanjay Tripathi <sanjay.tripa...@citrix.com<mailto:sanjay.tripa...@citrix.com>> Reply-To: Sanjay Tripathi <sanjay.tripa...@citrix.com<mailto:sanjay.tripa...@citrix.com>> To: Sateesh Chodapuneedi <sateesh.chodapune...@citrix.com<mailto:sateesh.chodapune...@citrix.com>>, "mice_...@tcloudcomputing.com<mailto:mice_...@tcloudcomputing.com>" <mice_...@tcloudcomputing.com<mailto:mice_...@tcloudcomputing.com>>, Min Chen <min.c...@citrix.com<mailto:min.c...@citrix.com>>, Devdeep Singh <devdeep.si...@citrix.com<mailto:devdeep.si...@citrix.com>> Cc: Nitin Mehta <nitin.me...@citrix.com<mailto:nitin.me...@citrix.com>>, "cloudstack-dev@incubator.apache.org<mailto:cloudstack-dev@incubator.apache.org>" <cloudstack-dev@incubator.apache.org<mailto:cloudstack-dev@incubator.apache.org>>, Sanjay Tripathi <sanjay.tripa...@citrix.com<mailto:sanjay.tripa...@citrix.com>> Subject: Re: Review Request: CLOUDSTACK-1374: Volume table is not getting updated with volume size. This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9558/ On February 25th, 2013, 12:37 p.m., Nitin Mehta wrote: server/src/com/cloud/storage/download/DownloadMonitorImpl.java<https://reviews.apache.org/r/9558/diff/1/?file=261150#file261150line742> (Diff revision 1) {'text': 'public void handleVolumeSync(HostVO ssHost) {', 'line': 693, 'expand_offset': 18} 742 // Set volume size in volumes table What if the size is already set ? why do we need to set it again ? This is for the final sync of volumes (same way we update the volume_host_ref table) in cases if the volume is not completely downloaded and MS is in shutdown state(this may be one case) etc. - Sanjay On February 25th, 2013, 12:31 p.m., Sanjay Tripathi wrote: Review request for cloudstack, Devdeep Singh, Sateesh Chodapuneedi, mice xia, and Min Chen. By Sanjay Tripathi. Updated Feb. 25, 2013, 12:31 p.m. Description When user uploads a volume using uploadVolume API command, only volume_host_ref table is getting updated with corresponding size of volume and "volumes" table, the size of volume still remains zero even ager the volume gets completely downloaded. Testing Verified the fix on my local CloudStack setup. Bugs: CLOUDSTACK-1374 Diffs * server/src/com/cloud/storage/download/DownloadListener.java (d0b1868) * server/src/com/cloud/storage/download/DownloadMonitorImpl.java (e12bc32) View Diff<https://reviews.apache.org/r/9558/diff/>