Code RoomBatch ingest lacks size limits
MediumPrep Room Coding #1785

Batch ingest lacks size limits

Code reviewCode quality & reviewMid–Senior~22 min

Review this Java endpoint that ingests a batch of log events.

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.

0:00 of about 22 min
Mark a line and say what kind of problem it is.0 findings
1@PostMapping("/ingest")
2public ResponseEntity<Void> ingest(@RequestBody List<LogEvent> events) {
3 for (LogEvent e : events) {
4 Instant ts = Instant.parse(e.getTimestamp());
5 store.write(e.getMessage(), ts);
6 }
7 return ResponseEntity.accepted().build();
8}
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.