CohQL snapshot names share a SimpleDateFormat across commands

Aperta
#160 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@SebTardif ci sta già lavorando.

Dal 10/11/2026.

  • #161 di @SebTardif — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

Read AbstractSnapshotStatement in coherence-core, focusing on replaceDateMacros and the shared WEEKDAY_NAME and MONTH_NAME formatters; compare their use with the synchronization in DateTimeAdapter. Done means concurrent calls expand %w and %M to the correct names without formatter exceptions. Pull request #161 is already open for this issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

CohQL snapshot names expand %w and %M through two shared static SimpleDateFormat instances, WEEKDAY_NAME and MONTH_NAME, on AbstractSnapshotStatement. replaceDateMacros calls format on both with no lock. SimpleDateFormat is not thread-safe, so two snapshot commands at the same time can throw from inside the formatter or expand the wrong weekday or month.

To Reproduce

Call replaceDateMacros with a name that contains %w and %M from several threads at the same time.

Expected behaviour

Each call expands %w to the weekday name and %M to the month name.

Environment

  • Coherence CE main, AbstractSnapshotStatement in coherence-core
  • Any current Java runtime

Additional context

DateTimeAdapter already synchronizes its shared SimpleDateFormat. These two formatters are only used by replaceDateMacros, and that method should lock them the same way.

Lingua principale
Java
Stelle
475
Fork
80
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di oracle/coherence

Tutte le issue di oracle/coherence

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.