Skip to content

Commit

Permalink
nfs-proxy: fix logging CDC
Browse files Browse the repository at this point in the history
Acked-by: Gerd Behrmann
Target: master, 2.8, 2.7
Require-book: no
Require-notes: no
(cherry picked from commit 6e7943f)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
  • Loading branch information
kofemann committed Apr 4, 2014
1 parent 8be4e30 commit 454769f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.dcache.cells.AbstractCell;
import org.dcache.cells.CellStub;
import org.dcache.chimera.JdbcFs;
import org.dcache.commons.util.NDC;
import org.dcache.nfs.vfs.Inode;
import org.dcache.util.RedirectedTransfer;
import org.dcache.util.TransferRetryPolicy;
Expand Down Expand Up @@ -85,6 +86,7 @@ ProxyIoAdapter getAdapter(Inode inode, Subject subject, InetSocketAddress client
protocolInfo.isPassive(true);

final PnfsId pnfsId = new PnfsId(_fileFileSystemProvider.inodeFromBytes(inode.getFileId()).toString());
NDC.push(pnfsId.toString());
final DcapTransfer transfer = new DcapTransfer(_pnfsHandler, subject);
DcapTransfer.initSession();
transfer.setProtocolInfo(protocolInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;

import dmg.cells.nucleus.CDC;

import org.dcache.commons.util.NDC;
import org.dcache.nfs.ChimeraNFSException;
import org.dcache.nfs.nfsstat;
import org.dcache.nfs.v4.AbstractNFSv4Operation;
Expand Down Expand Up @@ -47,8 +50,8 @@ public ProxyIoREAD(nfs_argop4 args, DcapProxyIoFactory proxyIoFactory) {
public void process(CompoundContext context, nfs_resop4 result) {
final READ4res res = result.opread;

try {

try (CDC ignored = new CDC()) {
NDC.push(context.getRpcCall().getTransport().getRemoteSocketAddress().toString());
Inode inode = context.currentInode();
if (!context.getFs().hasIOLayout(inode)) {
/*
Expand Down

0 comments on commit 454769f

Please sign in to comment.