Failure recovery

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

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
fsharp, sql
Lĩnh vực
backend, databases, networking

Hướng nghiên cứu

Bắt đầu với GetDataContext() và hành vi được mô tả cho các kết nối tĩnh, sau đó đọc phần thảo luận liên quan về cơ sở hạ tầng trong #238. Công việc được xem là hoàn tất khi đã thống nhất phạm vi cho các recovery helper và có bản mô tả có thể tái hiện về các trường hợp kết nối bị hỏng và dictionary rỗng.

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

Mô tả

enhancement

I have a (quite common scenario I suppose) web server using SQLProvider to connect a database that is located on a different server.

Sometimes the network connection does fail. That is the nature of HTTP. I try to deal with that having a retry logics when calling GetDataContext().

Now, if the web-server runs a maintenance boot (Windows update) and the network connection is not up and running when the server restarts, this is what happens:

  • Server will start, but the connection is in a broken state
  • If the connection is stored to a static variable, all the queries will crash on runtime even when the connection has been restored. Maybe because the column dictionary is empty or something.
  • This can be fixed by accessing the connection as a function, having a backing-field for the connection, and creating it again if it's null.
  • Another problem seems to be that if the server is running for long time, it seems that the primary-key dictionary goes to empty. This will cause update clauses not to work. I don't know yet the scenario and why but I think it's again about network connection breakups.

Besides that, there is more generic infrastructure, described more detailed in #238 but that started to be off-topic so I started a new issue.

Should we have some kind of extra-functions-namespace (like namespace FSharp.Data.Sql.Extensions) in SQLProvider to provide customers some tools to fight with this kind of nasty real life problems?

Ngôn ngữ chính
F#
Star
627
Fork
147
Merge trung bình
2 giờ 2 phút
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 fsprojects/SQLProvider

Tất cả issue của fsprojects/SQLProvider

Issue tương tự

Thêm issue về Backend & API Design

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.