nodeSolidServer / nodeSolidServer/node-solid-server

Deletion of decimals fail with a 409

オープン
#1,519 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
JavaScript
スター
1.8k
フォーク
308
PR マージ指標
30日以内にマージされた PR はありません

説明

When I write the following data to my Pod:

@prefix : <#>.
@prefix schem: <http://schema.org/>.

:160581889284507796464006133086
a schem:MonetaryAmount; schem:amount 1.0; schem:currency "USD".

Written using the following request:

curl 'https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl' -X PATCH -H 'Content-Type: application/sparql-update' --data-raw $' INSERT DATA {<https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl#160581889284507796464006133086> a <http://schema.org/MonetaryAmount>;\n    <http://schema.org/currency> "USD";\n    <http://schema.org/amount> "1"^^<http://www.w3.org/2001/XMLSchema#decimal>.\n};'

As far as I can tell I should be able to delete that data with the following PATCH:

DELETE DATA {<https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl#160581889284507796464006133086> a <http://schema.org/MonetaryAmount>;
    <http://schema.org/amount> "1.0"^^<http://www.w3.org/2001/XMLSchema#decimal>;
    <http://schema.org/currency> "USD".}; 

However, that results in the following response:

The patch could not be applied. Could not find to delete: https://vincent-test.solidcommunity.net/private/tmp/tripledoc-bug.ttl#160581889284507796464006133086 http://schema.org/amount "1.0"^^http://www.w3.org/2001/XMLSchema#decimal .

This appears to happen specifically with decimals. (Though it seems to be the problem has a similar root cause to https://github.com/solid/node-solid-server/issues/1468, but for decimals rather than booleans.)

See this sandbox for the reproduction (log in with a solidcommunity.net account): https://codesandbox.io/s/floral-glitter-jfejz?file=/src/index.ts

(Originally reported by @abigpotostew against Tripledoc.)

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、issue にある curl リクエストで小数の DELETE DATA の失敗を再現し、その前の INSERT DATA リクエストと比較します。小数の RDF 用語に対するサーバーの PATCH 処理を追跡します。リクエストで同値の "1.0"^^xsd:decimal を使用したときに、保存されている "1"^^xsd:decimal の削除が成功すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, node.js
領域
backend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。