in lib/internal/Router.js [414:441]
async _getCachePartitions(cacheId, tries = GET_CACHE_PARTITIONS_RETRIES) {
if (tries <= 0) {
return;
}
Logger.logDebug('Getting cache partitions info...');
try {
await this.send(
BinaryUtils.OPERATION.CACHE_PARTITIONS,
async (payload) => {
// We always request partition map for one cache
payload.writeInteger(1);
payload.writeInteger(cacheId);
},
this._handleCachePartitions.bind(this));
}
catch (err) {
if (err instanceof Errors.LostConnectionError) {
return;
}
// Retries in case of an error (most probably
// "Getting affinity for topology version earlier than affinity is calculated")
await this._sleep(GET_CACHE_PARTITIONS_DELAY);
this._getCachePartitions(cacheId, tries - 1);
}
}