Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-18183

rat targets do not adhere to build.dir property

    XMLWordPrintableJSON

Details

    Description

      I detected this when I was trying to put my build dir to ramdisk. I have plenty of RAM available on my workstation (64GB) and I was thinking about moving "build" dir to ramdisk so I could make it faster a little bit and also spare some write cycles to ssd. It can look like irrelevant improvement but I think that if devs are building the project repeatedly times and times again, this can easily add up.

      mkdir /tmp/cassandra
      # in /etc/fstab
      tmpfs /tmp/cassandra tmpfs defaults,noatime,size=2048M,x-gvfs-show,mode=1777 0 0
      # then sudo mount -a
      # I have worktree setup so the build for each branch will end up in different dir:
      # mkdir -p /tmp/cassandra/{trunk,cassandra-4.1,cassandra-4.0,cassandra-3.11,cassandra-3.0}
      

      Then in build.properties for each respective branch:

      ant.gen-doc.skip: true
      build.dir: /tmp/cassandra/trunk/build
      build.dir.lib: /tmp/cassandra/trunk/build/lib
      

      The problem with this is that it fails on rat, because there is not "build.dir" property used, it is hardcoded to "build" but there is not anything to rat on so it will hang.

      To have the very same experience, I am also creating a symlink

      ln -s /tmp/cassandra/trunk/build build
      

      so "cd build / ls build" in the root of the repository will take me to ramdisk. The problem with this is that there is "build/" in .gitignore but not "build" (as file) so the repository is in dirty state. I suggest to add "build" to .gitignore as part of this PR as that is just an opportunistic fix really.

      Attachments

        Activity

          People

            smiklosovic Stefan Miklosovic
            smiklosovic Stefan Miklosovic
            Stefan Miklosovic
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m