TS-1648: use int64_t for bucket indexes (in case there are more than 2^31).