subruns do not work, file size accounting does not work

Issue #269 resolved
Former user created an issue

Subruns have been broken by following commit. It looks like the wr_write() method was changed to return written size instead of an error code. I guess not all wr_write() methods were changed correctly. Also with change, how do wr_write() methods report write errors? https://bitbucket.org/tmidas/midas/commits/471bdf014fb83bfc6d46e0cf275a5277422784cc K.O.

Comments (7)

  1. dd1

    Another subtle bug introduced by that commit, wr_written() returns in “int”, while all file size accounting uses “double” bcause “int” is too short for holding size of large files. K.O.

  2. dd1

    ok, I see the breakage. all wr_write() methods (except for root wr_write()) return a status, not bytes-written. But the log_write() code that calls the top-level wr_write() was changed to assume bytes-written is returned. This broke all writers except for the ROOT writer. K.O.

  3. dd1

    Hi, Stefan, you will not like my solution.

    For this release I will undo this commit - it changes how file size accounting and writing of statistics has been done for several past release and I do not want to retest the new code or any combination of old and new code - it is a lot of work to test this stuff.

    This will cause the incorrect accounting in the root writer to return and if I cannot fix it “easily”, I will reopen the original bug with “too bad we could not fix it in this release” (note that it is broken in all past releases, too).

    For the next release I want to simplify all this code in the mlogger, only the c++ class based writers will remain and the confusion in the root writer whether it is called “the old way” or “the new way” will go away and the double-counting bug will be gone.

    K.O.

  4. dd1

    Hi, Stefan, you will like my solution. It turns out the two code paths separate cleanly, so your code works and my code works. But somehow I cannot test writing to root files, fetest causes a crash of rmlogger… K.O.

  5. Log in to comment