Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-240

Remove synchronization on low-level disk read/write

    Details

      Description

      The RW and WORM persistence stores currently require synchronization on disk read and write operations to avoid a Java bug with concurrent file extension. This code should be refactored to use a read/write lock where reads and writes obtain the read lock and file size changes obtain the write lock. This will provide a no contention path for the vast majority of all disk operations. Note that root block read/write operations can also use the read lock. There is nothing special about them in this sense.

        Activity

        Hide
        bryanthompson bryanthompson added a comment -

        Both the RWStrategy (DiskRW) and the WORMStrategy (DiskWORM) have been modified per this issue. They need to undergo extensive testing before they can be deployed. The WORMStrategy will replace the DiskOnlyStrategy (it is binary compatible) and the DiskWORM BufferMode will disappear when we do that (it is just there to let us test things without breaking existing Disk BufferMode users).

        Show
        bryanthompson bryanthompson added a comment - Both the RWStrategy (DiskRW) and the WORMStrategy (DiskWORM) have been modified per this issue. They need to undergo extensive testing before they can be deployed. The WORMStrategy will replace the DiskOnlyStrategy (it is binary compatible) and the DiskWORM BufferMode will disappear when we do that (it is just there to let us test things without breaking existing Disk BufferMode users).
        Hide
        bryanthompson bryanthompson added a comment -

        The BufferMode#DiskWORM (WORMStrategy) is a binary compatible implementation of BufferMode#Disk (DiskOnlyStrategy) which does not synchronize for disk read/write operations but which imposes a mutex for file extension and disk read/write. Once this implementation has been tested more extensively, BufferMode#Disk will simply use the WORMStrategy implementation and the DiskOnlyStrategy and the DiskWORM BufferMode will disappear. People interested in evaluating the new mode may explicitly specify BufferMode#DiskWORM in the properties (the override is effective at restart and is not itself persistent).

        The BufferMode#DiskRW also does not synchronize on low-level disk read/write.

        Show
        bryanthompson bryanthompson added a comment - The BufferMode#DiskWORM (WORMStrategy) is a binary compatible implementation of BufferMode#Disk (DiskOnlyStrategy) which does not synchronize for disk read/write operations but which imposes a mutex for file extension and disk read/write. Once this implementation has been tested more extensively, BufferMode#Disk will simply use the WORMStrategy implementation and the DiskOnlyStrategy and the DiskWORM BufferMode will disappear. People interested in evaluating the new mode may explicitly specify BufferMode#DiskWORM in the properties (the override is effective at restart and is not itself persistent). The BufferMode#DiskRW also does not synchronize on low-level disk read/write.

          People

          • Assignee:
            bryanthompson bryanthompson
            Reporter:
            bryanthompson bryanthompson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: