# Why Resolver does not initialize resolve stream?

**URL:** <https://forums.foundationdb.org/t/why-resolver-does-not-initialize-resolve-stream/2933>\
**Category:** FoundationDB Core\
**Created:** [October 9, 2021, 12:05pm UTC](https://forums.foundationdb.org/t/why-resolver-does-not-initialize-resolve-stream/2933 "2021-10-09T12:05:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![superhail](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/superhail/32/1191_2.png) [@superhail](https://forums.foundationdb.org/u/superhail)\
**Post date:** [October 9, 2021, 12:05pm UTC](https://forums.foundationdb.org/t/why-resolver-does-not-initialize-resolve-stream/2933/1 "2021-10-09T12:05:04Z")

</div>

According to [link](https://github.com/apple/foundationdb/blob/ddf85af360c8e38dc454dbd8c481ef2a7efddacb/fdbserver/ResolverInterface.h#L47-L50), fdb seems to be only initializing `metrics` and `split` RequestStream in `initEndpoints` method, why not init `resolve` stream in this method as well? what’s the logic here?

---

<div class="post-metadata">

**Author:** ![markus.pilman](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/markus.pilman/32/379_2.png) [@markus.pilman](https://forums.foundationdb.org/u/markus.pilman)\
**Post date:** [October 11, 2021, 5:32pm UTC](https://forums.foundationdb.org/t/why-resolver-does-not-initialize-resolve-stream/2933/2 "2021-10-11T17:32:26Z")

</div>

An endpoint is default-initialized when it is serialized for the first time. Or more specifically: `FlowReceiver::getEndpoint` will initialize this lazily if it hasn’t before.

The reason we sometimes call `initEndpoints` explicitly is because of priority. If not done explicitly, each endpoint will have priority `TaskPriority::DefaultEndpoint` (and for most endpoints this is the correct behavior).
