# Bulk loader fail

**URL:** <https://discuss.dgraph.io/t/bulk-loader-fail/12181>\
**Category:** Dgraph\
**Tags:** kind:question, dgraph\
**Created:** [January 5, 2021, 12:26pm UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181 "2021-01-05T12:26:33Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![musiciansLyf](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/musicianslyf/32/5834_2.png) [@musiciansLyf](https://discuss.dgraph.io/u/musiciansLyf)\
**Post date:** [January 5, 2021, 12:26pm UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/1 "2021-01-05T12:26:33Z")

</div>

One million nodes have been imported and cannot be retrieved!

---

<div class="post-metadata">

**Author:** ![musiciansLyf](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/musicianslyf/32/5834_2.png) [@musiciansLyf](https://discuss.dgraph.io/u/musiciansLyf)\
**Post date:** [January 5, 2021, 12:28pm UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/2 "2021-01-05T12:28:09Z")

</div>

version: ![image](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/d/db77297f2f0e807a9be382bf34daebcc1505f448.png)

---

<div class="post-metadata">

**Author:** ![musiciansLyf](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/musicianslyf/32/5834_2.png) [@musiciansLyf](https://discuss.dgraph.io/u/musiciansLyf)\
**Post date:** [January 5, 2021, 12:29pm UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/3 "2021-01-05T12:29:10Z")

</div>

Cluster date:

 ![image](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/7/71b3aa93f2fb0cf44e9aff8524ac4efa2c60564c.jpeg)

---

<div class="post-metadata">

**Author:** ![musiciansLyf](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/musicianslyf/32/5834_2.png) [@musiciansLyf](https://discuss.dgraph.io/u/musiciansLyf)\
**Post date:** [January 5, 2021, 12:30pm UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/4 "2021-01-05T12:30:36Z")

</div>

But I can only retrieve what I just created

 ![image](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/3/3b80b82771ca799144e3b844200c6c324a1e6c8a.jpeg)

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [January 5, 2021, 4:11pm UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/5 "2021-01-05T16:11:13Z")

</div>

> [@musiciansLyf](#):
>
> One million nodes have been imported and cannot be retrieved!

Please, share the steps taken.

---

<div class="post-metadata">

**Author:** ![musiciansLyf](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/musicianslyf/32/5834_2.png) [@musiciansLyf](https://discuss.dgraph.io/u/musiciansLyf)\
**Post date:** [January 6, 2021, 5:41am UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/6 "2021-01-06T05:41:54Z")

</div>

Steps:

1. Start zero node and load data in bulk

2. Copy the P directory in the out directory to the first alpha node

3. Start the first alpha node and see the following log:

Creating snapshot at index

1. Start the other two alpha nodes, and the first node appears the following log twice

Stream snapshot: OK

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [January 6, 2021, 5:45am UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/7 "2021-01-06T05:45:00Z")

</div>

> [@musiciansLyf](#):
>
> Start zero node

Have you started from scratch?

> [@musiciansLyf](#):
>
> load data in bulk

What configs you have used in the bulk load?

> [@musiciansLyf](#):
>
> Creating snapshot at index

That’s normal.

---

<div class="post-metadata">

**Author:** ![musiciansLyf](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/musicianslyf/32/5834_2.png) [@musiciansLyf](https://discuss.dgraph.io/u/musiciansLyf)\
**Post date:** [January 6, 2021, 6:19am UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/8 "2021-01-06T06:19:24Z")

</div>

> [@MichelDiz](#):
>
> Have you started from scratch?

Yes, I deleted all the files in the w folder before starting the zero node

> [@MichelDiz](#):
>
> What configs you have used in the bulk load?

I am using rdf.gz About one million nodes are loaded in the format file. The schema format is:

````auto
< type >: String @ index (hash)

<source>:[uid] @reverse .

<relation>:[uid] @reverse .

<namespace>:string @index(hash) .

<source_ id>:default .

<tenant_ id>:string @index(hash) .

<create_ time>:default .

< dgraph.cors >:[string] @index(exact) @upsert .

< dgraph.type >:[string] @index(exact) .

<identity_ id>:string @index(hash) .

<source_ type>:default .

< dgraph.drop.op >:string .

< dgraph.graphql.xid >:string @index(exact) @upsert .

< dgraph.graphql.schema >:string .

< dgraph.graphql .p_ query>:string .

< dgraph.graphql .p_ sha256hash>:string @index(exact) .

< dgraph.graphql.schema_ history>:string .

< dgraph.graphql.schema_ created_ at>:datetime .

type < dgraph.graphql {

dgraph.graphql.schema

dgraph.graphql.xid

}

type < dgraph.graphql.history {

dgraph.graphql.schema_ history

dgraph.graphql.schema_ created_ At

}

type < dgraph.graphql.persisted_ query> {

dgraph.graphql .p_ query

dgraph.graphql .p_ sha256hash

}```
````

---

<div class="post-metadata">

**Author:** ![musiciansLyf](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/musicianslyf/32/5834_2.png) [@musiciansLyf](https://discuss.dgraph.io/u/musiciansLyf)\
**Post date:** [January 6, 2021, 6:23am UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/9 "2021-01-06T06:23:14Z")

</div>

After a period of time, only the first alpha node can retrieve and process, but the other nodes still can’t. I debugged the P folder of the other two nodes, and there was no imported data

---

<div class="post-metadata">

**Author:** ![musiciansLyf](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/musicianslyf/32/5834_2.png) [@musiciansLyf](https://discuss.dgraph.io/u/musiciansLyf)\
**Post date:** [January 6, 2021, 6:29am UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/10 "2021-01-06T06:29:06Z")

</div>

Finally, copy the created directory directly to each alpha node to retrieve the results.

---

<div class="post-metadata">

**Author:** ![Valdanito](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/valdanito/32/1381_2.png) [@Valdanito](https://discuss.dgraph.io/u/Valdanito)\
**Post date:** [January 6, 2021, 7:49am UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/11 "2021-01-06T07:49:05Z")

</div>

> [@musiciansLyf](#):
>
> Finally, copy the created directory directly to each alpha node to retrieve the results.

This is necessary when using bulk loader.

---

<div class="post-metadata">

**Author:** ![musiciansLyf](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/musicianslyf/32/5834_2.png) [@musiciansLyf](https://discuss.dgraph.io/u/musiciansLyf)\
**Post date:** [January 6, 2021, 8:19am UTC](https://discuss.dgraph.io/t/bulk-loader-fail/12181/12 "2021-01-06T08:19:21Z")

</div>

Well, because I don’t have a large amount of data, I use the for small dataset method.

reference resources: [https://dgraph.io/docs/deploy/fast-data-loading/bulk-loader/](https://dgraph.io/docs/deploy/fast-data-loading/bulk-loader/)
