While creating gsi index the disk space is took up quickly

my index was about 2.9GB,i was creating it 10 day before.but my disk space been tooken about 14GB and didn`t release.Then i restart the couchbase service,the disk space was released.Why does this happen?