Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4869

Add a more verbose error message for "unable to open Buffered file "

    XMLWordPrintable

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Icebox
    • None

    Description

      Hello,

      Example error message:

      D 35 CAL0002: Failed to open file: /var/lib/columnstore/data1/systemFiles/dbrm/SMTxnID, exception: unable to open Buffered file 
      

      Code path /utils/ibdatafile/BufferedFile.cpp

      BufferedFile::BufferedFile(const char* fname, const char* mode, unsigned opts) :
          IDBDataFile( fname ),
          m_fp( 0 ),
          m_buffer( 0 )
      {
          m_fp = fopen(fname, mode);
       
          if ( m_fp == NULL )
          {
              throw std::runtime_error("unable to open Buffered file ");
          }
      

      If it returns NULL, errno will be set, which gave information about the reason,
      why fopen() failed. ( if ( errno != 0 ) )

      Addings the errno would be helpful, what is going on.

      Upon successful completion, fopen() shall return a pointer to the object controlling the stream. Otherwise, a null pointer shall be returned, [CX] [Option Start]  and errno shall be set to indicate the error. 
      

      https://pubs.opengroup.org/onlinepubs/007904975/functions/fopen.html

      Attachments

        Issue Links

          Activity

            People

              leonid.fedorov Leonid Fedorov
              Richard Richard Stracke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.