Code Room
Code reviewHard
Question
Review this Java dual-write (DB + search index).
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
@Servicepublic class ProductService { private final ProductRepository productRepo; private final SearchIndex searchIndex; private final RedisCache cache; public void createProduct(Product p) { p.setId(UUID.randomUUID().toString()); productRepo.save(p); // Postgres searchIndex.index(p); // Elasticsearch cache.put(p.getId(), p); // Redis }}Run or narrate your approach, then ask the coach.