I want to know that is all the buckets are rolled every time we restart the indexer and is it safe.?
Is there any specific time a bucket can be rolled.?
will the restart of indexer will effect the buckets/indexes/searches?
buckets are rolled when time is the one you configured (or by default) or bucket dimension is the one you configured (or by default), rolling action isn't specificately related to Splunk restart, it's related to time and dimension configured.
Remeber that a bucket is rolled (or deleted after retention time) when the newest event exeed the configured time or the max configured dimension.
Indexer restart will effect the buckets/indexes/searches if you modified some configuration (e.g. change index retention), otherwise buckets roling is subject to splunk configuration (time & dimentions).