1. 20 Mar, 2019 2 commits
  2. 16 Mar, 2019 1 commit
  3. 15 Mar, 2019 1 commit
    • Steven Allen's avatar
      remove ThreadSafeDatastore · 9f529bc3
      Steven Allen authored
      It's a lie! We:
      
      1. Assume that our datastores are thread-safe all over the place, not bothering
         to check for this interface.
      2. Implement this interface for, e.g., the mount datastore that _may not_ be
         thread-safe (depending on the sub-datastores).
      
      Basically, there's no sane way to to do something like this in go. What we
      _want_ is:
      
      ```rust
      pub trait ThreadSafe {}
      
      struct MyWrapper<D: Datastore> { ... }
      
      impl<D: Datastore> ThreadSafe for MyWrapper<D> where D: ThreadSafe {}
      ```
      
      Actually, we don't even need this because rust has already done all the hard
      work with the `Sync` trait.
      
      ....
      
      But we're using go which barely has types.
      
      ---
      
      For completeness, it's actually possible to do this in go:
      
      ```go
      type threadSafeMixin struct{}
      func (threadSafeMixin) ThreadSafe() {}
      
      func NewWrapper(d Datastore) Datastore {
        if _, ok := d.(ThreadSafe) {
          return &struct{myWrapper, threadSafeMixin}{myWrapper{d}, threadSafeMixin{}}
        }
        return &myWrapper{d}
      }
      ```
      
      Let's not.
      9f529bc3
  4. 28 Feb, 2019 1 commit
  5. 07 Feb, 2019 1 commit
  6. 06 Feb, 2019 4 commits
  7. 31 Jan, 2019 2 commits
  8. 29 Jan, 2019 3 commits
  9. 28 Jan, 2019 3 commits
  10. 24 Jan, 2019 3 commits
  11. 27 Dec, 2018 1 commit
  12. 26 Dec, 2018 2 commits
  13. 11 Dec, 2018 2 commits
  14. 09 Nov, 2018 3 commits
  15. 06 Nov, 2018 1 commit
  16. 24 Oct, 2018 1 commit
  17. 23 Oct, 2018 4 commits
  18. 05 Oct, 2018 1 commit
  19. 04 Oct, 2018 3 commits
    • Steven Allen's avatar
      gx publish 3.4.0 · 6196c6a3
      Steven Allen authored
      6196c6a3
    • Steven Allen's avatar
      test GetSize · b3b58152
      Steven Allen authored
      b3b58152
    • Steven Allen's avatar
      add a GetSize method · 1cd3a342
      Steven Allen authored
      We can also add this as an extension but it's simple enough I'd like to add it
      directly to the Datastore.
      
      Use-case: The blockstore now has a GetSize and bitswap uses it for packing
      multiple blocks into a single message. Unfortunately, this means that bitswap is
      now calling blockstore.GetSize which calls datastore.Get which tends to be more
      expensive than datastore.Has.
      1cd3a342
  20. 27 Sep, 2018 1 commit