Skip to content

Commit

Permalink
Try to avoid updating storage space info created field
Browse files Browse the repository at this point in the history
  • Loading branch information
enricovianello committed Jan 13, 2022
1 parent b19f0f1 commit 7f69cad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
15 changes: 2 additions & 13 deletions src/main/java/it/grid/storm/catalogs/ReservedSpaceCatalog.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,11 @@ public void addStorageSpace(StorageSpaceData ssd) throws DataAccessException {
*/
public void updateStorageSpace(StorageSpaceData ssd) throws DataAccessException {

updateStorageSpace(ssd, null);
}

/**
* @param ssd
* @param updateTime
*
* @throws DataAccessException
*/
public void updateStorageSpace(StorageSpaceData ssd, Date updateTime) throws DataAccessException {

log.debug("Storage Space DAO retrieved.");

StorageSpaceTO ssTO = new StorageSpaceTO(ssd);
updateTime = updateTime == null ? new Date() : updateTime;
ssTO.setUpdateTime(updateTime);
ssTO.setCreated(null); // we don't want to update the creation timestamp
ssTO.setUpdateTime(new Date());

ssDAO.updateStorageSpace(ssTO);
log.debug("StorageSpaceTO updated in Persistence");
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/it/grid/storm/space/SpaceHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ public TSpaceToken createVOSA_Token(String spaceTokenAlias, TSizeInBytes totalOn

if (tokenArray == null || tokenArray.size() == 0) {
// the VOSpaceArea does not exist yet
SpaceHelper.log.debug("VoSpaceArea {} still does not exists. Start creation process.",
spaceTokenAlias);
log.debug("VoSpaceArea {} still does not exists. Start creation process.", spaceTokenAlias);

This comment has been minimized.

Copy link
@enricovianello

enricovianello Jul 26, 2022

Author Member

fix your British!


PFN sfname = null;
try {
Expand Down

0 comments on commit 7f69cad

Please sign in to comment.