Quick revision
The short answer
We resolve it by deciding one owner for the customer address data, chosen by which business capability defines what an address is and when it may change, and by making the other two services consumers through the owner's API or events, with a funded migration plan. The decision is recorded in a catalogue that teams and reviewers actually use, new shared write access requires architecture review, and the teams get time in their roadmaps to do the work, not only a decision.
What to remember
In this answer, we saw that shared write access lets each service apply its own rules to the same data, which causes repeated incidents with no clear place to fix them. We resolved it by choosing one owner based on the business capability that defines the data, turning the other services into consumers through APIs or events with a sequenced migration, recording ownership in a catalogue people use, requiring review for new shared writes, and giving the teams real roadmap time to do the work.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
We resolve it by deciding one owner for the customer address data, chosen by which business capability defines what an address is and when it may change, and by making the other two services consumers through the owner's API or events, with a funded migration plan. The decision is recorded in a catalogue that teams and reviewers actually use, new shared write access requires architecture review, and the teams get time in their roadmaps to do the work, not only a decision.
Why this question is asked
Three services writing to one table is a situation that rarely starts as a design. It grows: one team added a column, another needed a quick fix, a third imported addresses from a partner. Then incidents begin, such as an address overwritten by a stale import or a validation rule enforced in one service and not the others, and nobody can say who should fix it. Interviewers ask this leadership question because the technical fix is well known and the hard part is organisational. In this answer, we will see why shared writes cause incidents, how to choose the owner, how to move the other services to consumers, how to record and protect the decision, and how to make sure the work actually gets done.
1Why Shared Writes Keep Causing Incidents
When three services write the same rows, each one carries its own idea of what a valid address is and when it may be changed. The checkout service normalises postcodes, the CRM service accepts free text from agents, and the partner import overwrites addresses every night. Each change looks correct from inside its own service, but together they produce addresses that flip back and forth, lose apartment numbers or fail delivery.
Worse, there is no single place to put a fix. If we add validation in checkout, the import still writes bad data. If we add a column, three codebases need updating and deploying together. The incidents are a symptom of missing ownership, and patching them one by one will not stop them.
2Choosing One Owner
We pick the owner by asking which business capability defines the data: whose rules say what a valid address is, when it may change and what happens downstream when it does. In many companies that is a customer profile or customer account capability, because the customer edits their own address there and other areas only use it. The owner is not simply the team that wrote the table first, nor the loudest consumer.
I would make this decision quickly with the three team leads and a domain expert from the business, in one or two sessions, using the incident history as evidence. Writing it down as a short decision record, with the reasons and the alternatives considered, makes it easier to accept and harder to reopen without new information.
- List all writers and readersfrom code search and database audit logs
- Pick the defining capabilitywhose rules decide what a valid address is
- Record the owner and decisioncatalogue entry plus decision record
- Owner exposes API and events
AddressChangedon a topic, PUT on an endpoint - Migrate writers one by oneeach with a date and rollback
- Revoke direct write grantsonly the owner's database user can write
6 steps in order. Play them, or step through them one at a time.
3Turning the Other Services Into Consumers
Once the owner is chosen, the other services stop writing the table directly. If they need to change an address, as the CRM does when an agent takes a call, they call the owner's API, and the owner applies its rules. If they only need to read it, as checkout does, they read it through the API or keep a copy updated from an AddressChanged event. The partner import becomes a client of the owner too, which forces a clear rule about whether imported data may overwrite what a customer typed.
The migration should be sequenced. The owner first builds the API and events, then each other service is moved one at a time, each with a date and a rollback plan, and finally the database grants for direct writes are removed so the rule is enforced by the system, not by memory. Removing the grant is the step that proves the migration is finished.
4Recording Ownership Where People Look
A decision that lives in a meeting note is forgotten in six months. Ownership belongs in a catalogue that teams and reviewers use daily, such as a developer portal like Backstage, where every data set and service lists its owning team, its on-call rotation and its consumers. Reviewers can then check, during a design or code review, whether a change introduces a new writer to someone else's data.
Alongside the catalogue, we set one simple rule: any new shared write access to another team's data needs an architecture review. Reads through APIs or events can be added freely; direct writes are the exception that needs a reason. That keeps the problem from coming back with the next quick fix.
5Funding the Change, Not Only Deciding It
The most common reason ownership fixes fail is that they are decided but never scheduled. The owning team now has to build and run an API for other teams, and each consuming team has to change code that works today. If this work competes with feature commitments without explicit priority, it slips quarter after quarter while incidents continue.
So as the leader I would get the migration into each team's roadmap with agreed time, for example two sprints for the owner and one for each consumer, approved by the product and engineering managers. I would track it like any other delivery, report the incident count for the address data before and after, and make it visible when the last direct write grant is removed. That visible result helps the next ownership decision go faster.
6Follow-up questions
What if two teams both have a strong claim to own the data?
Then the data may really be two data sets. A delivery address for an order is a snapshot that belongs to the order, while the customer's current home address belongs to the customer profile. Splitting the concept often resolves the conflict. If it is truly one data set, the person accountable for the architecture decides, records the reasons, and the other team becomes a consumer.
How do you handle the period while services are being migrated?
We keep the table as it is but add the owner's API and events first, and route new writes through the owner one service at a time. A reconciliation check that compares addresses written directly with what the owner would accept helps catch problems early. Direct write access is removed only when no service uses it, which logs can confirm.
How do you keep a catalogue accurate?
By making it part of the workflow: services cannot be deployed without a catalogue entry, ownership is read by tools like the paging system, and reviewers check it. Data that is used by machines tends to stay correct, while documentation nobody uses goes stale.
7Conclusion
In this answer, we saw that shared write access lets each service apply its own rules to the same data, which causes repeated incidents with no clear place to fix them. We resolved it by choosing one owner based on the business capability that defines the data, turning the other services into consumers through APIs or events with a sequenced migration, recording ownership in a catalogue people use, requiring review for new shared writes, and giving the teams real roadmap time to do the work.
Open with
The root cause here is not a bug but missing ownership: three services each apply their own idea of a valid address to the same rows, so fixes in one place are undone in another.
Then, if they want more
I would first list every writer and reader from code search and database logs, then decide one owner with the three leads and someone from the business. The owner is the capability that defines the data, usually the customer profile, because that is where the rules about valid addresses and changes belong, not simply whoever created the table.
The other services become consumers: if they need to change an address they call the owner's API, and if they only read it they use the API or a copy updated by an AddressChanged event.
We migrate them one at a time with dates and rollback, and at the end we revoke direct write grants so only the owner can write. I would record the owner in the service catalogue the teams and reviewers use, and set a rule that new shared write access to another team's data needs architecture review.
Most importantly, I would get the work into each team's roadmap with agreed time, because a decision without capacity never gets done, and I would report the incident count before and after to show the result.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Cloud documentation, Resilience4j documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Data ownership between teams is unclear: three services write to the same customer...": https://scrivio-interview-library.netlify.app/spring-boot/microservice-design/8c6c760f49/