It depends on if your using secondary storage, cookie caching, and if you're using the built-in session fetching endpoints
With secondary storage, it also stores the session (including user context, like the name) in secondary storage, and that'll be used before hitting your database
With cookie caching, it does the same as above but in the cookie, and that'll be used before hitting your secondary storage/database
Using the built-in api endpoints to update your username also updates the session in secondary storage/cookie (can obviously only update the cookie that's made the request), so that solves that problem.
If you don't have secondary storage, and have disabled cookie caching, then I can't see any reasons this will cause a problem - if either of the above are enabled however, you'll also need to update them, if you want to use the built in api.getSession to return your user data, for example