Print

Print


Hi Michal,

If the two mv operations are being performed in parallel then indeed the results are unpredictable. That said, I don’t think the test framework is does that. I believe everything is done serially. You are correct, though, that part of the mv operation is asynchronous. This is because the operation is considered complete once notifications of file registration changes have been sent but not necessarily received or even processed (i.e. this is not a 2-phase commit operation). So, it is possible that the second mv may fail because it is initiated before the first one fully completes.

Andy

From: simonmichal
Sent: Monday, July 13, 2015 7:53 AM
To: xrootd/xrootd
Cc: Andrew Hanushevsky
Subject: Re: [xrootd] Timing / propagation issue in mv command (#235)

Hi Andy,
I observed this behaviour in the unit tests:
xrootd/tests/XrdClTests/FileSystemTest.cc -> test case: MvTest, the test was done with one metamanager, 2 managers, and 4 data servers.

There is a race condition in the following code snippet:

CPPUNIT_ASSERT_XRDST( fs.Mv( filePath1, filePath2 ) ); // first move operation
CPPUNIT_ASSERT_XRDST( fs.Mv( filePath2, filePath1 ) ); // second move operation

that's the error message:

FileSystemTest.cc:136:Assertion
Test name: FileSystemTest::MvTest
assertion failed

a.. Expression: st.IsOK()
b.. [fs.Mv( filePath2, filePath1 )]: [ERROR] Server responded with an error: [301 1] No servers are available to write the file.
It seems to me that the 'Mv' operation is asynchronous and sometimes the second move operation is being executed before the first one (it might be that this behaviour is correct and the test case is erroneous, this needs clarification?)


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.



Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1