JS SDK: a non-finite cacheTtlMs keeps a cached answer past the key-less track() record

Đang mở
#1,540 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, typescript
Lĩnh vực
api

Hướng nghiên cứu

Start in sdk/js/src/client.ts, where the constructor accepts cacheTtlMs, then in attribution.ts, where a non-finite lifetime maps to 0 and falls to the 24-hour floor. Reproduce with cacheTtlMs: Infinity: answer a flag, advance time past 25 hours, and check whether a key-less track() is still tagged. Done when the constructor rejects non-finite or negative values, or the record lifetime becomes unbounded to match, and the docs say which.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug post-launch

The JS SDK accepts a cacheTtlMs that is not a finite number, and then a cached flag answer outlives the record that tags a key-less track(), the case #1423 fixed for finite lifetimes.

What happens

Measured on main (d48e06c8) and on #1539:

  • The constructor accepts any cacheTtlMs (sdk/js/src/client.ts), including Infinity and NaN.
  • A cache entry with either value never expires: in a probe, both were still live after a simulated year.
  • The key-less track() record falls back to 24 hours, because attribution.ts maps a non-finite lifetime to 0 and then takes the 24-hour floor.
  • With cacheTtlMs: Infinity, a flag answered at T0 is read from the cache at T0 + 25 h with no request, and a key-less track() then goes to /tracking/track untagged. With a finite 48-hour lifetime the same steps are tagged, as #1501 intended.

Expected

One of: the constructor refuses a non-finite or negative cacheTtlMs; or the record's lifetime is unbounded when the cache's is. The docs then say which.

Priority

LOW: it needs a cache-forever setting. After launch; the 0.3.0 docs say the guarantee holds for a finite cacheTtlMs.

Ngôn ngữ chính
Python
Star
0
Fork
4
Merge trung bình
5 giờ 36 phút
Pull request đã merge (30 ngày)
509

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Controlvar/controlvar

Tất cả issue của Controlvar/controlvar

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.