Share index update code between client lib and RangeServer