ipfs-shipyard / git-remote-ipld

MIT License
147 stars 33 forks source link

Slow to return ipld hash after push #20

Closed zixu-zhao closed 5 years ago

zixu-zhao commented 5 years ago

I am trying to make a proof of concept that this project will be able to handle git migration for a huge project with history. I am using a CPU optimized cloud and initialize the ipfs daemon locally so the pushing process seems to be fine. However, after I see ok refs/heads/master, it is now stuck on returning the ipld hash for almost a half hour without exhausting my cloud resource, i.e. the memory and CPU usage is fairly not high (about 20% to 30%) which means it is working on something slowly.

Do you have any idea what could I do for this scenario? Thanks!

ubuntu@ip-172-31-46-206:~/gitlab-ce$ git push ipld:// master
< capabilities
> push
> fetch
>
< list for-push
> 0000000000000000000000000000000000000000 refs/heads/master
>
< push refs/heads/master:refs/heads/master
<
Processing tasks
push: 397300/397322 (P:86360) 941bc54ed08537ca16602818351c6a1dee417296 z8mWaHHKr81d4zGnbubJnuh6TMf5mV2dj
> ok refs/heads/master
>
To ipld://
 * [new branch]              master -> master

BTW this is the repo info

count: 0
size: 0 bytes
in-pack: 1278288
packs: 1
size-pack: 576.01 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes
magik6k commented 5 years ago

The only reason for this I can think of is that some empty blocks are missing from your node and your ipfs node can't fetch them for some reason - try running:

ipfs object new empty
ipfs object new unixfs-dir

And see if it helps

zixu-zhao commented 5 years ago

Thanks! That works!