Skip to content

Commit

Permalink
pnfsmanager: Use correct queue for create entry and map messages
Browse files Browse the repository at this point in the history
Messages are put on a pnfs manager queue by pnfs id or path. This is to
ensure that we don't perform concurrent operations on a name space
object and two enforce a happens-before relationship on operations on
a name space object (ie to avoid messages from being processed out of
order). It is also essential for request folding to work correctly.

PnfsCreateEntryMessage and PnfsMapPathMessage however use their own path
field rather than the one in the PnfsMessage base class. Therefore a
random queue was chosen for these messages.

This patch fixes this by also binding the path in the base class. A future
patch for master should remove the redudant fields.

Target: trunk
Request: 2.7
Request: 2.6
Request: 2.2
Require-notes: yes
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/6051/
  • Loading branch information
gbehrmann committed Sep 30, 2013
1 parent cdfad05 commit f9f050d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ public PnfsCreateEntryMessage(String path){
_uid = NameSpaceProvider.DEFAULT;
_gid = NameSpaceProvider.DEFAULT;
_mode = NameSpaceProvider.DEFAULT;
setPnfsPath(path);
setReplyRequired(true);
}
public PnfsCreateEntryMessage(String path, int uid , int gid , int mode ){
_path = path;
_uid = uid ;
_gid = gid ;
_mode = mode ;
setPnfsPath(path);
setReplyRequired(true);
}

Expand All @@ -42,6 +44,7 @@ public PnfsCreateEntryMessage(String path,
_uid = uid ;
_gid = gid ;
_mode = mode ;
setPnfsPath(path);
setReplyRequired(true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class PnfsMapPathMessage extends PnfsMessage {

public PnfsMapPathMessage( String globalPath ){
_globalPath = globalPath ;
setPnfsPath(globalPath);
setReplyRequired(true);
}
public PnfsMapPathMessage( PnfsId pnfsId ){
Expand All @@ -30,6 +31,7 @@ public boolean shouldResolve() {
public String getGlobalPath(){ return _globalPath ; }
public void setGlobalPath( String globalPath ){
_globalPath = globalPath ;
setPnfsPath(globalPath);
}

@Override
Expand Down

0 comments on commit f9f050d

Please sign in to comment.