Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit 5dccfa3

Browse files
committed
Include traceback in warn log when checking stream cache ahead of known position
1 parent 6549c18 commit 5dccfa3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

synapse/util/caches/stream_change_cache.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import logging
16+
import traceback
1617
import math
1718
from typing import Collection, Dict, FrozenSet, List, Mapping, Optional, Set, Union
1819

@@ -71,10 +72,11 @@ def _check_current_position(self, current_pos: Optional[int] = None) -> None:
7172
if current_pos and current_pos > self.max_stream_pos:
7273
logger.warning(
7374
"Checking entity in %s stream cache cache with current position %s "
74-
"ahead of the max stream cache position %s",
75+
"ahead of the max stream cache position %s:\n%s",
7576
self.name,
7677
current_pos,
7778
self.max_stream_pos,
79+
"".join(traceback.format_stack()),
7880
)
7981

8082
def set_cache_factor(self, factor: float) -> bool:

0 commit comments

Comments
 (0)