Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Signal-Server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
GitHub Mirror
Signal
Signal-Server
Commits
9cd21d13
Unverified
Commit
9cd21d13
authored
1 year ago
by
Jonathan Klabunde Tomer
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
count ItemCollectionSizeLimitExceededExceptions persisting messages
parent
aaba95f9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagePersister.java
+8
-0
8 additions, 0 deletions
...hispersystems/textsecuregcm/storage/MessagePersister.java
with
8 additions
and
0 deletions
service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagePersister.java
+
8
−
0
View file @
9cd21d13
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
package
org.whispersystems.textsecuregcm.storage
;
package
org.whispersystems.textsecuregcm.storage
;
import
static
com
.
codahale
.
metrics
.
MetricRegistry
.
name
;
import
static
com
.
codahale
.
metrics
.
MetricRegistry
.
name
;
import
static
io
.
micrometer
.
core
.
instrument
.
Metrics
.
counter
;
import
com.codahale.metrics.Histogram
;
import
com.codahale.metrics.Histogram
;
import
com.codahale.metrics.Meter
;
import
com.codahale.metrics.Meter
;
...
@@ -14,6 +15,9 @@ import com.codahale.metrics.SharedMetricRegistries;
...
@@ -14,6 +15,9 @@ import com.codahale.metrics.SharedMetricRegistries;
import
com.codahale.metrics.Timer
;
import
com.codahale.metrics.Timer
;
import
com.google.common.annotations.VisibleForTesting
;
import
com.google.common.annotations.VisibleForTesting
;
import
io.dropwizard.lifecycle.Managed
;
import
io.dropwizard.lifecycle.Managed
;
import
io.micrometer.core.instrument.Counter
;
import
software.amazon.awssdk.services.dynamodb.model.ItemCollectionSizeLimitExceededException
;
import
java.time.Duration
;
import
java.time.Duration
;
import
java.time.Instant
;
import
java.time.Instant
;
import
java.util.List
;
import
java.util.List
;
...
@@ -43,6 +47,7 @@ public class MessagePersister implements Managed {
...
@@ -43,6 +47,7 @@ public class MessagePersister implements Managed {
private
final
Timer
persistQueueTimer
=
metricRegistry
.
timer
(
name
(
MessagePersister
.
class
,
"persistQueue"
));
private
final
Timer
persistQueueTimer
=
metricRegistry
.
timer
(
name
(
MessagePersister
.
class
,
"persistQueue"
));
private
final
Meter
persistQueueExceptionMeter
=
metricRegistry
.
meter
(
private
final
Meter
persistQueueExceptionMeter
=
metricRegistry
.
meter
(
name
(
MessagePersister
.
class
,
"persistQueueException"
));
name
(
MessagePersister
.
class
,
"persistQueueException"
));
private
final
Counter
oversizedQueueCounter
=
counter
(
name
(
MessagePersister
.
class
,
"persistQueueOversized"
));
private
final
Histogram
queueCountHistogram
=
metricRegistry
.
histogram
(
name
(
MessagePersister
.
class
,
"queueCount"
));
private
final
Histogram
queueCountHistogram
=
metricRegistry
.
histogram
(
name
(
MessagePersister
.
class
,
"queueCount"
));
private
final
Histogram
queueSizeHistogram
=
metricRegistry
.
histogram
(
name
(
MessagePersister
.
class
,
"queueSize"
));
private
final
Histogram
queueSizeHistogram
=
metricRegistry
.
histogram
(
name
(
MessagePersister
.
class
,
"queueSize"
));
...
@@ -137,6 +142,9 @@ public class MessagePersister implements Managed {
...
@@ -137,6 +142,9 @@ public class MessagePersister implements Managed {
try
{
try
{
persistQueue
(
accountUuid
,
deviceId
);
persistQueue
(
accountUuid
,
deviceId
);
}
catch
(
final
Exception
e
)
{
}
catch
(
final
Exception
e
)
{
if
(
e
instanceof
ItemCollectionSizeLimitExceededException
)
{
oversizedQueueCounter
.
increment
();
}
persistQueueExceptionMeter
.
mark
();
persistQueueExceptionMeter
.
mark
();
logger
.
warn
(
"Failed to persist queue {}::{}; will schedule for retry"
,
accountUuid
,
deviceId
,
e
);
logger
.
warn
(
"Failed to persist queue {}::{}; will schedule for retry"
,
accountUuid
,
deviceId
,
e
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment