fix: 7 performance/correctness fixes — v0.1.20
1. Убрано логирование тела сообщения (256KB I/O на каждый send — perf+security) 2. SentTimestamp исправлен: m.SentTime вместо time.Now() (баг) 3. MD5 не пересчитывается на ReceiveMessage — используется кэш из SendMessage 4. ChangeMessageVisibility/batch теперь персистит в Redis (баг — потеря данных) 5. MessageDoesNotExist error code: QueueExists → ReceiptHandleIsInvalid (copy-paste баг) 6. copystructure убран из GetQueueAttributes — простой map lookup 7. SNS dead code удалён (SnsErrors, SnsErrorType — не используется в SQS сервисе) Tested: quick_test 31/31 PASS, deployed v0.1.20
This commit is contained in:
+3
-6
@@ -79,13 +79,10 @@ func ExtractQueueAttributes(u url.Values) map[string]string {
|
||||
return attr
|
||||
}
|
||||
|
||||
// CreateErrorResponseV1 — формирует SQS error response по ключу ошибки.
|
||||
// Параметр isSqs оставлен для обратной совместимости (всегда true).
|
||||
func CreateErrorResponseV1(errKey string, isSqs bool) (int, interfaces.AbstractResponseBody) {
|
||||
var err interfaces.AbstractErrorResponse
|
||||
if isSqs {
|
||||
err = models.SqsErrors[errKey]
|
||||
} else {
|
||||
err = models.SnsErrors[errKey]
|
||||
}
|
||||
err := models.SqsErrors[errKey]
|
||||
|
||||
respStruct := models.ErrorResponse{
|
||||
Result: err.Response(),
|
||||
|
||||
Reference in New Issue
Block a user