Skip to content

Commit 7fe14b7

Browse files
authored
Exact match when deleting stream (#68)
When deleting a logstream from s3 avoid deleting other prefixes which starts with same stream_name for which delete request was made. For example, when deleting stream named test, such streams are also deleted because they share same prefix test teststream testlongrun testapplication Fix: Use delimiter at the end of stream name so that only those prefix are matched where stream name is exactly first component of path on s3. i.e test/ instead of test. This will match only logstreams named test.
1 parent c979bfc commit 7fe14b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/s3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ impl S3 {
175175
.client
176176
.list_objects_v2()
177177
.bucket(&S3_CONFIG.s3_bucket_name)
178-
.prefix(stream_name)
178+
.prefix(format!("{}/", stream_name))
179179
.into_paginator()
180180
.send();
181181

0 commit comments

Comments
 (0)