DPY-3021: OSON version 2 is not supported when selecting a JSON column after an in-place update (23.26)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Start by locating the thin mode OSON decoder and its version checks; the report identifies the accepted versions but gives no source file or test path. Reproduce with an in-place JSON_MERGEPATCH update, then read the decoder tests and add coverage for selecting the updated JSON column. Done means the read succeeds and the async statement can be executed again without ORA-01002.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- What versions are you using?
- python-oracledb 26.0.1, thin mode
- Oracle AI Database 26ai Free 23.26.3.0.0 (the
gvenzl/oracle-free:23-faststartimage) - Python 3.13.6, macOS arm64
- Is it an error or a hang or a crash?
An error.
- What error(s) or behavior you are seeing?
Once a row's JSON column has been updated in place, for example with JSON_MERGEPATCH or JSON_TRANSFORM in an UPDATE, selecting that column fails:
oracledb.exceptions.NotSupportedError: DPY-3021: OSON version 2 is not supported
The OSON decoder accepts only versions 1 and 3 (TNS_JSON_VERSION_MAX_FNAME_255 and TNS_JSON_VERSION_MAX_FNAME_65535), and the database sends version 2 for a document updated in place. JSON_SERIALIZE(doc) and JSON_TRANSFORM(doc, KEEP '$') read the same row without error.
With the async API there is a second symptom. If the same statement is executed again on that connection, it fails with ORA-01002: fetch out of sequence. Other statements still work, so the failed cursor seems to stay in the statement cache.
node-oracledb 7.0.1 fails on the same read with NJS-126: OSON version 2 is not supported. I'm reporting it there separately.
- Does your application call init_oracle_client()?
No, thin mode.
- Include a runnable Python script that shows the problem.
import asyncio
import oracledb
DSN = dict(user="drivine", password="...", dsn="localhost:1521/FREEPDB1")
c = oracledb.connect(**DSN)
cur = c.cursor()
cur.execute("DROP TABLE IF EXISTS oson_v2")
cur.execute("CREATE TABLE oson_v2 (id NUMBER PRIMARY KEY, doc JSON)")
cur.execute("""INSERT INTO oson_v2 VALUES (1, JSON('{"name":"Ada","bio":"b0"}'))""")
cur.execute("""UPDATE oson_v2 SET doc = JSON_MERGEPATCH(doc, JSON('{"bio":"b1"}')) WHERE id = 1""")
c.commit()
cur.execute("SELECT JSON_SERIALIZE(doc) FROM oson_v2")
print(cur.fetchall()) # [('{"name":"Ada","bio":"b1"}',)]
cur.execute("SELECT doc FROM oson_v2") # DPY-3021: OSON version 2 is not supported
async def main():
a = await oracledb.connect_async(**DSN)
for sql in ["SELECT doc FROM oson_v2", "SELECT 1 FROM dual", "SELECT doc FROM oson_v2"]:
try:
cursor = a.cursor()
await cursor.execute(sql)
print(await cursor.fetchall())
except Exception as e:
print(e)
# DPY-3021: OSON version 2 is not supported
# [(1,)]
# ORA-01002: fetch out of sequence
asyncio.run(main())
- Ngôn ngữ chính
- Python
- Star
- 455
- Fork
- 119
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của oracle/python-oracledb
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
oracle/python-oracledb#623 ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
oracle/python-oracledb#621 · 3 bình luận ·
-
Client Library or Database
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
oracle/python-oracledb#620 · 4 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
oracle/python-oracledb#619 ·
-
asyncio: DPY-4011 on connect_async() when the listener closes the original socket after a redirectCó thể đã có người làm @AlexGracas đã nhận 16 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
oracle/python-oracledb#616 ·
Tất cả issue của oracle/python-oracledb
Issue tương tự
-
Python Volcengine provider returns failures instead of raising themCó thể đã có người làm @Ricardo-M-L đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
agent-infra/sandbox#248 ·
-
Textractor leaves empty temporary files when remote retrieval failsCó thể đã có người làm @HuaTNA đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
test(bm_generation): pin the learning parameters and CPU sync shortcutCó thể đã có người làm @iloveeyjafjalla đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
qboson/kaiwu-pytorch-plugin#1341 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
elder-plinius/V3R1T4S#625 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
foxglove/mcap#1907 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày