<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:18:12 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-8716] Various update() operators for Binary Data</title>
                <link>https://jira.mongodb.org/browse/SERVER-8716</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;There are a few update operations that it might be nice to offer on binary data objects in documents:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;append/concatenate (maybe this could be an overload to $push?)&lt;/li&gt;
	&lt;li&gt;slice/subsequence&lt;/li&gt;
	&lt;li&gt;replace&lt;/li&gt;
&lt;/ul&gt;







</description>
                <environment></environment>
        <key id="66342">SERVER-8716</key>
            <summary>Various update() operators for Binary Data</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-execution">Backlog - Query Execution</assignee>
                                    <reporter username="richard.kreuter">Richard Kreuter</reporter>
                        <labels>
                    </labels>
                <created>Mon, 25 Feb 2013 17:12:41 +0000</created>
                <updated>Thu, 6 Apr 2023 18:04:17 +0000</updated>
                                                                            <component>Write Ops</component>
                                        <votes>4</votes>
                                    <watches>14</watches>
                                                                                                                <comments>
                            <comment id="677207" author="craig.leyshan@skyfii.com" created="Thu, 31 Jul 2014 04:30:52 +0000"  >&lt;p&gt;I have a use case that would benefit greatly by using a binary (byte array) and being able to manipulate individual bytes in updates atomically: Hyperloglog.  In this case, the size of the array is fixed, and updates need to be able to make use of the $max operator on individual bytes.  Right now it is &lt;b&gt;very&lt;/b&gt; space inefficient to put these in mongo in a way that allows safe parallel updates (using a so-called &quot;array&quot; of Integers, i&apos;m look at this thing taking up about 7 bytes for each byte of real information).  I think one way this could work is for &apos;byte&apos; to be a valid type in BSON, and for arrays in BSON to be encoded as an element type, length and then a dense packing of the elements.  Lastly, the update semantics in mongo would need to support arrays better.  rather than the existing &quot;key.n&quot; syntax, a &quot;key&lt;span class=&quot;error&quot;&gt;&amp;#91;n&amp;#93;&lt;/span&gt;&quot; syntax (or similar) could be adopted to be able to address individual positions in the array.  For example in upserts, with the current syntax, mongo thinks you want a document, not an array, if an insert is required.&lt;/p&gt;</comment>
                            <comment id="407303" author="justanyone" created="Tue, 20 Aug 2013 14:46:34 +0000"  >&lt;p&gt;To be very specific, we can significantly reduce our data footprint (and thus increase performance) by replacing our data model of:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ ...  &apos;vals&apos; : [   [1,2], [3,4], [5,6], ... ],...}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;with one where we have vals packed in a bit field, and we just append bits to the front/end, and remove bits from the front/end.  Our immediate need is appending to one end, and removing from the other, to keep a specific maximum length of time-series data in the bitfield.  Appending and removing from the same end is nearly useless in our use case, as we need a queue, not a stack.  Though, I can readily see how some people would need a stack.&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ ...  &apos;vals&apos; : BinaryObject ...}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Due to the way that MongoDB&apos;s BSON format has to encode the values as [ &lt;span class=&quot;error&quot;&gt;&amp;#91;1,2&amp;#93;&lt;/span&gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;2,3&amp;#93;&lt;/span&gt; ], each bracket and comma in this is functionally encoded to a byte, consuming (for floats) 30 bytes per numeric pair.  With this bitfield packing, the size per point would reduce to even down to 8 bytes per numeric pair (2 x 32-bit floats).  This is a HUGE savings in size consumed per datapoint, and would thus mean we could keep more in memory at once for faster data access and faster updating as well given it&apos;s more likely to be in memory.&lt;/p&gt;

&lt;p&gt;I would wager that this is a common need among many MongoDB users - the ability to pack data more tightly to optimize (reduce) data storage sizes.&lt;/p&gt;

&lt;p&gt;These bit-field operators should be fairly low level operators, and thus (on the surface) would seem to be fairly easy to implement.  &lt;/p&gt;

&lt;p&gt;Any other use cases out there?&lt;/p&gt;
</comment>
                            <comment id="305416" author="justanyone" created="Wed, 3 Apr 2013 20:53:06 +0000"  >&lt;p&gt;This would allow much tighter packing of data for us.  instead of $push onto &lt;/p&gt;
{ ... &apos;arrayName&apos;: [ [1,2], [3,4], ...}
&lt;p&gt; I could use python&apos;s struct to binary-encode 5 and 6 into a 2-byte number (or in our case, two doubles), bson.Binary() -encode them, then append them to an existing &lt;/p&gt;
{ ... &apos;arrayName&apos; : BinaryObj(...) }
&lt;p&gt; object.  This would change from 30 bytes per datapoint pair to 16 bytes per datapoint pair.&lt;/p&gt;

&lt;p&gt;I&apos;m presuming there&apos;s BSON project support for append binary data to binary object.  Likewise, we&apos;d need to be able to resize (remove data from the front or end) of binary data.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="43910">SERVER-6399</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="25395">SERVER-4362</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="72147">SERVER-9380</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="18384">SERVER-3281</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1654966">SERVER-55386</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000nmLSOQA2, 5002K00000zBGsLQAW]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 3 Apr 2013 20:53:06 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 28 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-6399'>SERVER-6399</a></s>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            9 years, 28 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-execution</customfieldvalue>
            <customfieldvalue>craig.leyshan@skyfii.com</customfieldvalue>
            <customfieldvalue>justanyone</customfieldvalue>
            <customfieldvalue>richard.kreuter</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrn4kv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2fmf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7047</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsbyzz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>