Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-9563

Improve code style and readability

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.1.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 5
    • Storage Engines - 2022-07-25

      Summary
      This ticket has multiple small tasks to improve code readability and code style. 

      Acceptance Criteria (Definition of Done)

      1. In "test/format/backup.c" there's this code: 
        trace_msg(session, "Backup #%u start%s%s%s", ++counter, config == NULL ? "" : ": (", config == NULL ? "" : config, config == NULL ? "" : ")"); 

        In other to improve readability we suggest changing it to something like this:

        if (config == NULL)
            trace_msg(session, "Backup #%u start", ++counter);
        else
            trace_msg(session, "Backup #%u start: (%s)", ++counter, config); 
      1. There's no reason for "wt_wrap_open_session" and "wt_wrap_close_session" to be inline. Remove inline specifier for the method declarations.
      2. Rename "test/format/ts.c" to "test/format/timestamp.c"
      3. Make API names consistent in "test/format/ts.c". Here's a comment from Alex G: "I feel like the API naming in this file could be cleaned up a bit. I'd prefer to consistently use timestamp instead of mixing timestamp and ts. I'd also prefer if we could figure out a naming scheme that makes it practical to use it as a prefix rather than a suffix."

       

            Assignee:
            monica.ng@mongodb.com Monica Ng
            Reporter:
            alexey.anisimov@mongodb.com Alexey Anisimov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: