0

In other words, if I have a MemoryRepo instance, can I be performing a:

  • "fetch(), updating references and performing a send_pack()" on one thread and
  • traversing the commit graph or even introducing a change into the object_store and local references in another thread (using the same MemoryRepo instance)?

1 Answers1

0

Yes, MemoryRepo is meant to be thread-safe.

jelmer
  • 2,405
  • 14
  • 27
  • Thanks Jelmer. One more question, please. Due to memory consumption limitation (MemoryRepo seems to have 4.5 GB peek memory consumption for an approx. 200 MB repo) we may want to switch to FileRepo. From your previous answer may I infer that FileRepo is not prepared to be used by many threads at the same time? (Sames scenario as described in the initial question above, but applied to FileRepo). Thank you in advance!. – Alejandro Fernandez Oct 01 '20 at 14:29
  • Yeah, MemoryRepo keeps full objects - it optimizes for performance rather than memory efficiency. FileRepo should be thread-safe as well. – jelmer Oct 04 '20 at 09:48